OFFSET
1,1
COMMENTS
A "k-almost prime" is a number which is the product of exactly k primes.
Let pi_k(n) be the number of k-almost primes less than or equal to n. In 1909, on page 211 of the Handbuch, Edmund G. H. Landau stated that pi_k(n) ~ (n/log n)*(log log n^(k-1))/(k-1)! for all k >= 0.
Because of this fact, eventually the semiprimes will outnumber the primes; they do starting at 34. Likewise the 3-almost primes will outnumber the semiprimes and they do starting at 15526.
The terms from a(6) = 151165506068 to a(170) = 151165607026 correspond to counts of 4-almost and 3-almost primes overtaking each other multiple times. - Giovanni Resta, Aug 17 2018
REFERENCES
Edmund Georg Hermann Landau, Handbuch der Lehre von der Verteilung der Primzahlen, Band I, B. G. Teubner, Leipzig u. Berlin, or Chelsea Publishing, NY 1953, or Vol. 1, Teubner, Leipzig; third edition: Chelsea, New York 1974.
LINKS
Giovanni Resta, Table of n, a(n) for n = 1..170
Edmund Georg Hermann Landau, Handbuch der Lehre von der Verteilung der Primzahlen, page 211, (4); University of Michigan Historical Math Collection.
FORMULA
It seems plausible that 0.8 * log(A284411(m) - 1) <= log(a(n)) <= log(A284411(m)) in the instances where the overtaking concerns m-almost-primes and (m-1)-almost-primes. - Peter Munn, Aug 03 2023
EXAMPLE
a(1) = 2 since beginning with the natural numbers (A000027) the race is even with no group in the lead. But at 2, we encounter our first member (1 is unity and is not a member of any group here) which is a prime and therefore the primes take the lead with 2.
a(2) = 34 which is a semiprime. pi_1(34) = 11 and pi_2(34) = 12. This is the first time that the semiprimes overtake the primes.
MATHEMATICA
k = 1; lst = {}; tf = 0; p1 = 0; p2 = 0; While[k < 100001, If[PrimeOmega@k == 1, p1++]; If[PrimeOmega@k == 2, p2++]; If[p1 > p2 && tf == 0, tf++; AppendTo[lst, k]]; If[p2 > p1 && tf == 1, tf--; AppendTo[lst, k]]; k++]; lst
(* cross check using *) AlmostPrimePi[k_Integer, n_] := Module[{a, i}, a[0] = 1; If[k == 1, PrimePi[n], Sum[PrimePi[n/Times @@ Prime[ Array[a, k - 1]]] - a[k - 1] + 1, Evaluate[ Sequence @@ Table[{a[i], a[i - 1], PrimePi[(n/Times @@ Prime[Array[a, i - 1]])^(1/(k - i + 1))]}, {i, k - 1}]] ]]]; (* Eric W. Weisstein, Feb 07 2006 *)
(* as an example *) AlmostPrimePi[2, 15526] => 3986 whereas AlmostPrimePi[3, 15526] => 3987.
CROSSREFS
KEYWORD
hard,nonn
AUTHOR
Jonathan Vos Post and Robert G. Wilson v, Oct 09 2016
EXTENSIONS
a(6)-a(22) from Giovanni Resta, Aug 17 2018
Name clarified by Peter Munn, Dec 31 2022
STATUS
approved