关于因数个数的估计
作者:互联网
根据知乎提问:n的正因子个数d(n)有没有上界公式? 的某一篇回答:
依次进行正因子个数的上界估计。
根据常规 64 位 C++ 编译器,已定义好的最大可处理数字为无符号 128 位数。
由 \(\lg 2^{128}={128\ln 2\over \ln 10}=38.531839444989586\) 得到,数字大小最大为 \(10^{38}\) 数量级。
代入该公式,设 \(f=1.0660186782978\) ,则 \(d(n)\leq n^{f\over \ln\ln n}\) 。
根据因子成对出现的性质,显然有 \(d(n)=O(n^{1\over 2})\) 。
故接下来对能覆盖到 \(10^38\) 范围内的数字,因子数量复杂度低于该数量级的数字进行讨论。
若使得因子数量复杂度为 \(O(n^{1\over a})\) 级别,则 \({1\over a}={f\over \ln\ln n}\) 得到 \(n=\exp(\exp(af))\) 。
而 \(2^{128}\) 范围内的数字大小,只要求解 \(a\leq {\ln \ln n\over f}=4.207728658657603\) 范围内的数即可。
根据上文分析,写出 Python 代码打表得到:
from math import exp, log, ceil
a = [i/10 for i in range(21, 51)]
f = 1.0660186782978
n = [exp(exp(aa*f)) for aa in a]
n = [ceil(e) for e in n]
\(a\) | \(n\) |
---|---|
\(2.1\) | \(11856\) |
\(2.2\) | \(34057\) |
\(2.3\) | \(110164\) |
\(2.4\) | \(406654\) |
\(2.5\) | \(1738652\) |
\(2.6\) | \(8753504\) |
\(2.7\) | \(52858714\) |
\(2.8\) | \(390750565\) |
\(2.9\) | \(3617538165\) |
\(3.0\) | \(43018071794\) |
\(3.1\) | \(675839548956\) |
\(3.2\) | \(14474296668132\) |
\(3.3\) | \(437571976063337\) |
\(3.4\) | \(19410620857790028\) |
\(3.5\) | \(1319171636936014848\) |
\(3.6\) | \(144104189927338721280\) |
\(3.7\) | \(26690167107950257111040\) |
\(3.8\) | \(8894458890575846435717120\) |
\(3.9\) | \(5697405341997788647173128192\) |
\(4.0\) | \(7550015955759005359048004468736\) |
\(4.1\) | \(22461913631953170755494748583100416\) |
\(4.2\) | \(164317515616056148597455376191261245440\) |
\(4.3\) | \(3270497494682288794799613260950708804386816\) |
\(4.4\) | \(198214662250587109063189970365898976532065419264\) |
\(4.5\) | \(41461937722482761448087520167641851535323560255946752\) |
\(4.6\) | \(34409205992524455515778659230163786754610455634792033550336\) |
\(4.7\) | \(132293413178812347006722650584299826975433146756991096170492198912\) |
\(4.8\) | \(2799892201280858664472213212371129133650677178454238324834614224481157120\) |
\(4.9\) | \(395194263901491273419274306768477718805938427492517290376062592684198196427096064\) |
\(5.0\) | \(460517803377513163733349009956995900794800533418947767169497969779647974517564244404207616\) |
标签:10,ln,over,个数,因子,因数,估计,exp,128 来源: https://www.cnblogs.com/JustinRochester/p/16066569.html