login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A176815 Radius of the second-shortest interval (of positive length) centered at prime(n) that has prime endpoints, (zero if no solution exists). 0
0, 0, 0, 0, 8, 10, 12, 0, 18, 18, 28, 24, 18, 30, 24, 30, 30, 42, 30, 18, 30, 48, 30, 42, 54, 30, 24, 24, 42, 54, 30, 42, 36, 42, 42, 42, 54, 60, 60, 24, 48, 30, 60, 36, 60, 72, 18, 84, 36, 78, 36, 42, 42, 18, 24, 30, 42, 60, 36, 30, 84, 54, 30, 48, 84, 66, 48, 60, 54, 72, 36 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,5

COMMENTS

7+-10->primes;but 7-10=-3,so,term #4(for number 7) is 0, 11+-8->primes, 13+-10->primes, 17+-12->primes, 19+-22->primes;but 19-22=-3,so,term #8(for number 19)is 0, 23+-18->primes,..

LINKS

Table of n, a(n) for n=1..71.

MATHEMATICA

f[n_]:=Module[{a=1}, While[ !PrimeQ[n-a]||!PrimeQ[n+a], a++ ]; r[n, ++a]]; r[n_, k_]:=Module[{a=k}, While[ !PrimeQ[n-a]||!PrimeQ[n+a], a++ ]; If[a>n, 0, a]]; Table[f[Prime[n]], {n, 1, 5!}]

CROSSREFS

Cf. A078611

Sequence in context: A062372 A046031 A102758 * A338473 A336143 A347267

Adjacent sequences:  A176812 A176813 A176814 * A176816 A176817 A176818

KEYWORD

nonn

AUTHOR

Vladimir Joseph Stephan Orlovsky, Apr 26 2010

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 October 19 14:26 EDT 2021. Contains 348090 sequences. (Running on oeis4.)