OFFSET
1,1
EXAMPLE
3,s=3+4=7,t=3*4=12,t-s=12-7=5, prime, t+s=12+5=17, prime
4,s=4+5=9,t=4*5=20,t-s=20-9=11, prime,t+s=20+9=29, prime
MAPLE
a:=proc(n) local s, t: s:= 2*n+1: t:= n*(n+1): if isprime(t-s)=true and isprime(t+s)=true then n else end if end proc: seq(a(n), n=1..400); # Emeric Deutsch, Mar 31 2008
MATHEMATICA
a = ""; For[i = 1, i < 10^2, j = i + 1; s = i + j; m = i*j; p1 = m - s; p2 = m + s; If[PrimeQ[p1] && PrimeQ[p2], a = a <> ToString[i] <> ", "]; i++ ]; Print[a <> ".."]
Select[Range[500], PrimeQ[ #*(# - 1) - 1] && PrimeQ[ #*(# + 3) + 1] &] (* Stefan Steinerberger, Mar 24 2008 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladimir Joseph Stephan Orlovsky, Mar 21 2008
EXTENSIONS
Edited with more terms by Stefan Steinerberger and Emeric Deutsch, Mar 24 2008
STATUS
approved