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
KEYWORD
nonn
AUTHOR
Zak Seidov, Nov 18 2014
STATUS
approved