OFFSET
1,1
COMMENTS
Differs fromA120224in the first term.
LINKS
Harvey P. Dale,Table of n, a(n) for n = 1..1000
EXAMPLE
a(3)=4 because 3+4=7 and 3*4+1=13 are prime;
a(8)=9 because 8+9=17 and 8*9+1=73 are prime,
MATHEMATICA
Reap[Do[Do[If[PrimeQ[{n+x, n*x+1}]=={True, True}, Sow[x]; Break[]], {x, n+1, 1000}], {n, 120}]][[2, 1]]
mnk[n_]:=Module[{k=n+1}, While[!AllTrue[{n+k, n*k+1}, PrimeQ], k++]; k]; Array[ mnk, 80] (* The program uses the AllTrue function from Mathematica version 10 *) (*Harvey P. Dale,May 15 2015 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Zak Seidov,Jun 10 2006
STATUS
approved