OFFSET
1,1
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
EXAMPLE
3 is a term since it is a prime, 2 * 3 + 1 = 7 is a prime, 3 * (3 + 1) = 12, and (11, 13) are twin primes.
MAPLE
a:=proc(n) if isprime(n)=true and isprime(2*n+1)=true and isprime(n*(n+1)-1)= true and isprime(n*(n+1)+1)=true then n else end if end proc: seq(a(n), n=1.. 150000); # Emeric Deutsch, Apr 01 2008
MATHEMATICA
a = ""; For[i = 1, i < 10^5, j = i + 1; s = i + j; m = i*j; p1 = m - 1; p2 = m + 1; If[PrimeQ[i] && PrimeQ[s] && PrimeQ[p1] && PrimeQ[p2], a = a <> ToString[i] <> ", "]; i++ ]; Print[a <> ".."]
Select[Prime[Range[100000]], PrimeQ[2# + 1] && PrimeQ[ #*(# + 1) - 1] && PrimeQ[ #*(# + 1) + 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