login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A071986 Parity of Pi[n]. 5
0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1 (list; graph; refs; listen; history; internal format)
OFFSET

1,1

COMMENTS

a(n)+a(n-1) = 1 if and only if n is prime - Benoit Cloitre (benoit7848c(AT)orange.fr), Jun 20 2002

LINKS

Henry Lifchitz. Parity of Pi(n)

Terence Tao et. al., Prime counting function, Polymath1 project (2009)

FORMULA

a(n) = pi(n) mod 2.

EXAMPLE

a(6)=1 since three primes [2,3,5] are <= 6 and three is odd.

MATHEMATICA

Table[Mod[PrimePi[w], 2], {w, 1, 256}]

PROG

(PARI) a(n)=primepi(n)%2

CROSSREFS

Cf. A000720.

Sequence in context: A104893 A104894 A168393 * A079944 A059652 A108736

Adjacent sequences:  A071983 A071984 A071985 * A071987 A071988 A071989

KEYWORD

nonn,easy

AUTHOR

Labos E. (labos(AT)ana.sote.hu), Jun 17 2002

EXTENSIONS

Edited by Charles R Greathouse IV, Feb 19 2011

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 14 18:33 EST 2012. Contains 205663 sequences.