OFFSET
1,1
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
EXAMPLE
Take p = 13 and q = 17: product is 221 and sum is 30; add them to get 251, a prime. So 13 is a member.
MAPLE
a:=proc(n) if isprime(ithprime(n)*ithprime(n+1) +ithprime(n) +ithprime(n+1)) then ithprime(n) fi end: seq(a(n), n=1..250); # Emeric Deutsch, Mar 08 2007
MATHEMATICA
Prime@Select[Range[200], PrimeQ[Prime[ # ]Prime[ # + 1] + Prime[ # ] + Prime[ # + 1]] &] (* Ray Chandler, Mar 07 2007 *)
PROG
(PARI) v=List(); p=2; forprime(q=3, 1e4, if(isprime(p*q+p+q), listput(v, p)); p=q); Vec(v) \\ Charles R Greathouse IV, Jul 26 2012
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
J. M. Bergot, Mar 07 2007
EXTENSIONS
STATUS
approved