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

 

Logo

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 56th year, we are closing in on 350,000 sequences, and we’ve crossed 9,700 citations (which often say “discovered thanks to the OEIS”).

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A177462 Smallest k such that A000125(n)+k and A000125(n)-k are both prime. 0
1, 3, 2, 3, 1, 3, 4, 21, 3, 9, 18, 5, 9, 55, 36, 5, 21, 57, 30, 9, 7, 21, 14, 33, 49, 3, 150, 39, 117, 19, 12, 11, 27, 17, 66, 27, 21, 87, 10, 75, 7, 21, 14, 33, 39, 45, 30, 47, 3, 5, 210, 49, 27, 3, 30, 63, 5, 21, 58, 69, 5, 9, 168, 153, 9, 37, 204, 23, 33, 41, 78, 21, 123, 3, 100 (list; graph; refs; listen; history; text; internal format)
OFFSET

2,2

LINKS

Table of n, a(n) for n=2..76.

EXAMPLE

4+-1->primes. 8+-3->primes. 15+-2->primes. 26+-3->primes,..

MATHEMATICA

g[n_]:=(n+1)*(n^2-n+6)/6; f[n_]:=Block[{k}, If[OddQ[n], k=2, k=1]; While[ !PrimeQ[n-k]||!PrimeQ[n+k], k+=2]; k]; Table[f[g[n]], {n, 2, 5!}]

CROSSREFS

Cf. A000125, A078611, A172989, A172990, A177460, A177461

Sequence in context: A345440 A283976 A046818 * A106584 A213940 A236027

Adjacent sequences:  A177459 A177460 A177461 * A177463 A177464 A177465

KEYWORD

nonn

AUTHOR

Vladimir Joseph Stephan Orlovsky, May 09 2010

EXTENSIONS

Definition rephrased and offset adapted by R. J. Mathar, Aug 15 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 December 1 14:10 EST 2021. Contains 349430 sequences. (Running on oeis4.)