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

 

Logo

Annual Appeal: Today, Nov 11 2014, is the 4th anniversary of the launch of the new OEIS web site. 70,000 sequences have been added in these four years, all edited by volunteers. Please make a donation (tax deductible in the US) to help keep the OEIS running.

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A131378 Starting with 0, the sequence a(n) changes from 0 to 1 or back when the next number n is a prime. 3
0, 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 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,1

COMMENTS

Zero together with A071986 - Omar E. Pol, Feb 19 2011.

LINKS

Table of n, a(n) for n=0..100.

EXAMPLE

n = 0, 1, 2, 3, 4, 5, etc..

a(n)= 0, 0, 1, 0, 0, 1, etc.

Starting with 0 the sequence changes when we move from 1 to 2 because 2 is prime, again from 2 to 3 because also 3 is prime, then from 4 to 5 being 5 prime and so on.

MAPLE

P:=proc(n) local i, k; k:=0; for i from 0 by 1 to n do if isprime(i) then if k=1 then k:=0; else k:=1; fi; fi; print(k); od; end: P(100);

CROSSREFS

Cf. A131377.

Cf. A071986 - Omar E. Pol, Feb 19 2011.

Sequence in context: A116178 A028999 A091244 * A014707 A106138 A064990

Adjacent sequences:  A131375 A131376 A131377 * A131379 A131380 A131381

KEYWORD

easy,nonn

AUTHOR

Paolo P. Lava and Giorgio Balzarotti, Jul 04 2007

STATUS

approved

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

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

Last modified December 19 23:11 EST 2014. Contains 252240 sequences.