Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A071986
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A071986 Parity of Pi[n]. +0
4
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; listen)
OFFSET

1,1

COMMENT

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)

FORMULA

a(n)=Mod[Pi[n], 2]

EXAMPLE

a(100)=Mod[Pi[100],2]=1

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

MATHEMATICA

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

PROGRAM

(PARI) a(n)=if(n<1, 0, if(isprime(n), 1-a(n-1), a(n-1)))

CROSSREFS

Cf. A000720.

Sequence in context: A130198 A104893 A104894 this_sequence A079944 A059652 A108736

Adjacent sequences: A071983 A071984 A071985 this_sequence A071987 A071988 A071989

KEYWORD

nonn

AUTHOR

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

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified December 3 22:15 EST 2009. Contains 170310 sequences.


AT&T Labs Research