Saturday, 21 April 2012

nt.number theory - Asymptotic density of k-almost primes

As not necessarily proven results were asked for, I have found the following quite accurate:



Nk(x):=midnleqx:Omega(n)=kmidsimRebigg(frac21kalphae1+exlog(1+e+log(21kalphax))betabeta!(1+e+log(21+ealphax)bigg)


for 1leqkleqlfloorlog2(x)rfloor, where log2 is log base 2, gamma is Euler's constant,
beta=1+e+logalpha+(1+e+logalpha)1/pi, andalpha=frac12rmerfcbigg(frack(2egamma+frac14)(2egamma+frac14)sqrt2bigg)2rmTbigg(bigg(frack(2egamma+frac14)1bigg),egammafrac14bigg) 

where rmerfc is the complementary error function and rmT is the Owen T-function.



In integral form,
alpha=frac1piinti(3+8egamma)/(sqrt2(1+8egamma))nftyet2rmdt+int1/4egamma0frace(38egamma)2(1+t2)/(2(1+8egamma)2)1+t2rmdt.



As krightarrowinfty, alpharightarrow1, so



limkrightarrowinftyNk(xcdot2k1)simfracee+1xloglog(ee+1x)betalog(ee+1x)beta!,


where beta=log(ee+1)+log(ee+1)1/pi.



For kleqslant3, improvements to the above can certainly be made, but as krightarrowinfty (or more correctly, as krightarrowlfloorlog2(x)rfloor), the formulae above, as far as have been tested, seem to be fairly accurate.



For convenience, I include the following Mathematica code:



cdf[k_, x_] :=
Re[N[
(2^-k E^(1 + E) x Log[1 + E + Log[2^-k x (Erfc[(1 + 8 E^EulerGamma - 4 k)/(Sqrt[2]
(1 + 8 E^EulerGamma))] + 4 OwenT[(1 + 8 E^EulerGamma - 4 k)/(1 + 8 E^EulerGamma),
1/4 - E^EulerGamma])]]^(1 + E + Log[1/2 (Erfc[(1 + 8 E^EulerGamma - 4 k)/(Sqrt[2]
(1 + 8 E^EulerGamma))] +4 OwenT[(1 + 8 E^EulerGamma - 4 k)/(1 + 8 E^EulerGamma),
1/4 - E^EulerGamma])] + (1 + E + Log[1/2 (Erfc[(1 + 8 E^EulerGamma - 4 k)/(Sqrt[2]
(1 + 8 E^EulerGamma))] + 4 OwenT[(1 + 8 E^EulerGamma - 4 k)/(1 + 8 E^EulerGamma),
1/4 - E^EulerGamma])])^(1/[Pi])) (Erfc[(1 + 8 E^EulerGamma - 4 k)/(Sqrt[2]
(1 + 8 E^EulerGamma))] + 4 OwenT[(1 + 8 E^EulerGamma - 4 k)/(1 + 8 E^EulerGamma),
1/4 - E^EulerGamma]))/((1 + E + Log[1/2 (Erfc[(1 + 8 E^EulerGamma - 4 k)/(Sqrt[2]
(1 + 8 E^EulerGamma))] + 4 OwenT[(1 + 8 E^EulerGamma - 4 k)/(1 + 8 E^EulerGamma),
1/4 - E^EulerGamma])] + (1 + E + Log[1/2 (Erfc[(1 + 8 E^EulerGamma - 4 k)/(Sqrt[2]
(1 + 8 E^EulerGamma))] + 4 OwenT[(1 + 8 E^EulerGamma - 4 k)/(1 + 8 E^EulerGamma),
1/4 - E^EulerGamma])])^(1/[Pi]))!
(1 + E + Log[2^-k x (Erfc[(1 + 8 E^EulerGamma - 4 k)/(Sqrt[2] (1 + 8 E^EulerGamma))] +
4 OwenT[(1 + 8 E^EulerGamma - 4 k)/(1 + 8 E^EulerGamma), 1/4 - E^EulerGamma])]))]];

landau[k_, x_] := N[(x Log[Log[x]]^(-1 + k))/((-1 + k)! Log[x])];

actual[k_, x_] := N[Sum[1, ##] & @@ Transpose[{#, Prepend[Most[#], 1], PrimePi@
Prepend[ Prime[First[#]]^(1 - k) Rest@FoldList[Times, x, Prime@First[#]/Prime@Most[#]],
x^(1/k)]}] &@Table[Unique[], {k}]];


I warmly welcome any criticism or comments on the above, and apologise in advance if I have made any serious errors.



Note: Table code included as requested:



a = 7;
x = 10^a;
kk = 20;
TableForm[Transpose[{Table[x, {x, 1, kk}], Table[Round[landau[k, x]], {k, 1, kk}],
Table[Round[cdf[k, x]], {k, 1, kk}], Table[actual[k, x], {k, 1, kk}]}],
TableHeadings -> {None, {"k ", "Landau", "CDF ", "Actual"}},
TableSpacing -> {2, 3, 0}]

No comments:

Post a Comment