

A219098


Parity of primepi(3^n).


2



0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0


COMMENTS

The parity of pi(n) is obtained without calculating pi(n), and much more quickly. See the paper below.


LINKS

Table of n, a(n) for n=0..56.
Henri Lifchitz, Parity of pi(n)


EXAMPLE

For n = 4, primepi(3^4) = 22 = 0 (mod 2).


MATHEMATICA

Table[Mod[PrimePi[3^n], 2], {n, 0, 25}] (* T. D. Noe, Nov 12 2012 *)


CROSSREFS

Cf. A006880, A055729, A219071, A219097.
Sequence in context: A234577 A252742 A252743 * A285133 A274950 A191153
Adjacent sequences: A219095 A219096 A219097 * A219099 A219100 A219101


KEYWORD

nonn


AUTHOR

Henri Lifchitz, Nov 11 2012


STATUS

approved



