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!)
A114266 a(n) is the minimal number m that makes 2*prime(n)+prime(n+m) a prime. 2
1, 1, 1, 3, 3, 1, 1, 1, 3, 1, 2, 4, 6, 2, 6, 2, 1, 2, 5, 5, 2, 1, 2, 3, 5, 3, 1, 6, 1, 1, 8, 2, 4, 7, 1, 9, 3, 2, 9, 7, 5, 10, 4, 5, 1, 5, 5, 1, 1, 1, 8, 1, 1, 4, 6, 2, 1, 2, 12, 10, 1, 11, 8, 3, 11, 2, 2, 1, 4, 1, 7, 2, 3, 2, 11, 2, 3, 3, 3, 1, 1, 5, 2, 5, 1, 7, 3, 3, 4, 6, 4, 7, 4, 1, 9, 5, 3, 2, 4, 7, 2, 9, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,4

LINKS

Reinhard Zumkeller, Table of n, a(n) for n = 1..10000

EXAMPLE

n=1: 2*prime(1)+prime(1+1)=2*2+3=7 is prime, so a(1)=1;

n=2: 2*prime(2)+prime(2+1)=2*3+5=11 is prime, so a(2)=1;

...

n=4: 2*prime(4)+prime(4+1)=2*7+11=25 is not prime

...

2*prime(4)+prime(4+3)=2*7+17=31 is prime, so a(4)=3.

MATHEMATICA

Table[p1 = Prime[n1]; n2 = 1; p2 = Prime[n1 + n2]; While[cp = 2*p1 + p2; ! PrimeQ[cp], n2++; p2 = Prime[n1 + n2]]; n2, {n1, 1, 200}]

mnm[n_]:=Module[{m=1, p=2Prime[n]}, While[!PrimeQ[p+Prime[n+m]], m++]; m]; Array[mnm, 110] (* Harvey P. Dale, Aug 05 2017 *)

PROG

(Haskell)

a114266 n = head [m | m <- [1..],

                      a010051 (2 * a000040 n + a000040 (n + m)) == 1]

-- Reinhard Zumkeller, Oct 29 2013

CROSSREFS

Cf. A114227, A114230, A073703, A114235, A114262, A114228, A114231, A114233, A114236, A114263, A114265, A114267.

Cf. A000040, A010051.

Sequence in context: A242849 A072917 A319861 * A230206 A285117 A135910

Adjacent sequences:  A114263 A114264 A114265 * A114267 A114268 A114269

KEYWORD

easy,nonn

AUTHOR

Lei Zhou, Nov 20 2005

EXTENSIONS

Edited definition to conform to OEIS style. - N. J. A. Sloane, Jan 08 2011

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 July 12 17:10 EDT 2020. Contains 335665 sequences. (Running on oeis4.)