OFFSET
1,1
COMMENTS
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..1103 (n = 1..665 from Ivan Neretin)
EXAMPLE
10 is in the sequence since pi(10)=4=2^2.
MATHEMATICA
pow2[n_] := n==1||(n>1&&IntegerQ[n/2]&&pow2[n/2]); Select[Range[20000], pow2[PrimePi[ # ]]&]
Flatten@Table[Range[p = Prime[2^k], NextPrime[p] - 1], {k, 0, 11}] (* Ivan Neretin, Jan 21 2017 *)
PROG
(PARI) isok(n) = my(pi = primepi(n)); (pi==1) || (pi==2) || (ispower(primepi(n), , &k) && (k==2)); \\ Michel Marcus, Jan 23 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Aug 14 2002
EXTENSIONS
Edited by Dean Hickerson, Aug 15 2002
STATUS
approved