login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A219097
Parity of pi(2^n).
4
0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0
OFFSET
0
COMMENTS
The parity of pi(n) can be obtained without calculating pi(n), and much more quickly. See the paper below.
FORMULA
a(n) = A000035(A007053(n)). - David Baugh, Nov 06 2020
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