A125149 a(n) is the least k such that the n-almost prime count is positive and equal to the (n-1)-almost prime count. a(0) = 1.
1, 2, 10, 15495, 151165506066
Offset: 0
Examples
a(1) = 2 since 1 has no prime factors and 2 has one prime factor, therefore prime factor counts of 0 and 1 occur equally often in the first 2 integers. a(2) = 10 since there are 4 primes {2, 3, 5 & 7} and 4 semiprimes {4, 6, 9 & 10} less than or equal to 10. a(4) = 151165506066 since there are 32437255807 4-almost primes and 3-almost primes <= a(4).
Links
- Andrew Granville and Greg Martin, Prime Number Races, arXiv:math/0408319 [math.NT], Aug 24 2004.
- Eric Weisstein's World of Mathematics, Fundamental Theorem of Arithmetic.
- Eric Weisstein's World of Mathematics, Modular Prime Counting Function.
- Eric Weisstein's World of Mathematics, Prime Factor.
Crossrefs
Sequences listing r-almost primes, that is, k such that A001222(k) = r: A000040 (r = 1), A001358 (r = 2), A014612 (r = 3), A014613 (r = 4), A014614 (r = 5), A046306 (r = 6), A046308 (r = 7), A046310 (r = 8), A046312 (r = 9), A046314 (r = 10), A069272 (r = 11), A069273 (r = 12), A069274 (r = 13), A069275 (r = 14), A069276 (r = 15), A069277 (r = 16), A069278 (r = 17), A069279 (r = 18), A069280 (r = 19), A069281 (r = 20).
Cf. A180126.
Programs
-
Mathematica
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 *) f[n_] := Block[{k = 2^n}, While[AlmostPrimePi[n, k] < AlmostPrimePi[n - 1, k], k++ ]; k];
Extensions
Changed 33 to 34 in a comment. - T. D. Noe, Aug 11 2010
Edited by Peter Munn, Dec 17 2022
Comments