OFFSET
0,2
COMMENTS
For n = 0, 1, 2, ..., the index j corresponding to a(n) is 1, 7, 91, 2, 6, 8645, 50, 2, 6, 36, 96, 2, 6, 80, 232, 2, 6, 80, 64, 2, 6, 80, >6136, 2, 6, 44, > 564, 2, 6, 36, 96, 2, 6, 80, >286, 2, 6, 80, 64, 2, 6, ..., .
EXAMPLE
MATHEMATICA
nextKthAlmostPrime[n_, k_] := Block[{m = n + 1}, While[ Plus @@ Last /@ FactorInteger@ m != k, m++]; m] (* from Eric Weisstein, Feb 07 2006 *); f[n_] := Block[{c = 1, kp = 2^n}, While[ Mod[kp, 10^Floor[1 + Log10@ c]] != c, c++; kp = nextKthAlmostPrime[kp, n]]; kp]
(* These terms can be crosschecked by: *)
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 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Jonathan Vos Post and Robert G. Wilson v, Feb 24 2011
EXTENSIONS
Edited by N. J. A. Sloane, Mar 04 2011
The missing values, a(22), a(26) & a(34), were supplied to me via email dtd Mar 03 2011 from Donovan Johnson. - Robert G. Wilson v, Mar 22 2011
STATUS
approved