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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A215030 a(n) = A215029(A000040(n)), where A000040(n) is the n-th prime. 3
2, 1, 0, 1, 0, 1, 0, 1, 0, 1, 2, 1, 2, 1, 2, 1, 0, 1, 2, 1, 0, 1, 0, 1, 0, 1, 2, 1, 0, 1, 2, 1, 0, 1, 2, 1, 0, 1, 0, 1, 2, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 2, 1, 0, 1, 2, 1, 0, 1, 2, 1, 0, 1, 2, 1, 0, 1, 2, 1, 2, 1, 2, 1, 0, 1, 2, 1, 2, 1, 0, 1, 2, 1, 0, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 0, 1, 2, 1, 0, 1, 2, 1, 0, 1, 2, 1, 0, 1, 2, 1, 2, 1, 2, 1, 0, 1, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

For primes whose value is 0, see A214912; for value 1 see A031215; and for value 2 see A215031.

LINKS

Antti Karttunen, Table of n, a(n) for n = 1..10000

StackExchange, A prime number pattern, Jul 29 2012.

PROG

(PARI)

A215029(n) = if(n<=2, n, my(mp=precprime(n-1), d=n); while(mp>0, if(d>0, d -= mp, d += mp); mp = precprime(mp-1)); (d));

A215030(n) = A215029(prime(n)); \\ Antti Karttunen, Nov 28 2018

CROSSREFS

Cf. A000040, A215029, A214912, A031215, A215031, A215032, A215033, A215034, A215035.

Sequence in context: A247477 A072927 A120086 * A175816 A227573 A085004

Adjacent sequences:  A215027 A215028 A215029 * A215031 A215032 A215033

KEYWORD

nonn

AUTHOR

N. J. A. Sloane, Aug 05 2012

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified February 16 12:48 EST 2019. Contains 320163 sequences. (Running on oeis4.)