OFFSET
0
COMMENTS
The parity of pi(n) can be obtained without calculating pi(n), and much more quickly. See the paper below.
LINKS
Henri Lifchitz, Parity of pi(n)
FORMULA
EXAMPLE
For n = 5 , pi(2^5) = 11 = 1 (mod 2) = 1.
MAPLE
A071986 := proc(n)
numtheory[pi](n) mod 2 ;
end proc:
A219097 := proc(n)
A071986(2^n) ;
end proc: # R. J. Mathar, Nov 12 2012
MATHEMATICA
Table[Mod[PrimePi[2^n], 2], {n, 32}] (* Alonso del Arte, Nov 12 2012 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Henri Lifchitz, Nov 11 2012
EXTENSIONS
a(91) from David Baugh, Nov 06 2020
STATUS
approved