OFFSET
0,1
COMMENTS
A variant of A087711. - R. J. Mathar, Apr 09 2008
EXAMPLE
4-1=3 prime, 4+1=5 prime; 5-2=3, 5+2=7; 8-3=5, 8+3=11; 9-4=5, 9+4=13;
MAPLE
A137169 := proc(n) option remember ; if n = 0 then RETURN(2) ; fi ; for a from A137169(n-1)+1 do if isprime(a-n) and isprime(a+n) then RETURN(a) ; fi ; od: end: seq(A137169(n), n=0..80) ; # R. J. Mathar, Apr 09 2008
MATHEMATICA
s = ""; k = 0; For[i = 2, i < 22^2, If[PrimeQ[i - k] && PrimeQ[i + k], s = s <> ToString[i] <> ", "; k++ ]; i++ ]; Print[s]
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vladimir Joseph Stephan Orlovsky, Apr 03 2008
EXTENSIONS
More terms from R. J. Mathar, Apr 09 2008
Typo in Mathematica code corrected by Vincenzo Librandi, Jun 15 2013
STATUS
approved