

A247097


a(n) = least integer m such that prime(n)+m and prime(n+1)+m are prime.


2



2, 6, 6, 6, 6, 12, 18, 8, 12, 6, 6, 18, 24, 6, 8, 12, 6, 12, 30, 10, 18, 14, 12, 6, 6, 6, 30, 18, 24, 36, 20, 12, 18, 30, 6, 10, 30, 6, 18, 12, 42, 6, 30, 30, 12, 16, 6, 12, 48, 18, 30, 30, 6, 6, 8, 12, 6, 30, 30, 24, 24, 6
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

2,1


COMMENTS

In most cases terms are congruent to 0 mod 6. Out of the first 1000 terms, 830 are multiples of 6.
It is conjectured that a(n) always exists.


LINKS

Colin Barker, Table of n, a(n) for n = 2..10000


EXAMPLE

Offset is 2, hence first term corresponds to n=2.
For n=2, prime(n)=3, prime(n+1)=5, m=2, and 3+2 and 5+2 are prime.
For n=3, m=6, 5+6 and 7+6 are prime.


MATHEMATICA

lm[{a_, b_}]:=Module[{m=2}, While[!PrimeQ[a+m]!PrimeQ[b+m], m+=2]; m]; lm/@ Partition[ Prime[Range[2, 70]], 2, 1] (* Harvey P. Dale, Oct 02 2018 *)


PROG

(PARI) s=[]; for(n=2, 100, p=prime(n); q=prime(n+1); m=1; while(!(isprime(p+m)&&isprime(q+m)), m++); s=concat(s, m)); s \\ Colin Barker, Nov 18 2014


CROSSREFS

Sequence in context: A184409 A137479 A304363 * A258576 A278253 A294961
Adjacent sequences: A247094 A247095 A247096 * A247098 A247099 A247100


KEYWORD

nonn


AUTHOR

Zak Seidov, Nov 18 2014


STATUS

approved



