OFFSET
1,1
LINKS
K. D. Bajpai, Table of n, a(n) for n = 1..8900
EXAMPLE
19 is in the sequence because 2^2 + 2*3 + 3^2 = 19 is prime: 2 and 3 are consecutive primes.
109 is in the sequence because 5^2 + 5*7 + 7^2 = 109 is prime: 5 and 7 are consecutive primes.
MAPLE
MATHEMATICA
Select[Table[Prime[n]^2 + Prime[n] Prime[n + 1] + Prime[n + 1]^2, {n, 500}], PrimeQ[#] &]
PROG
(Python)
from itertools import islice
from sympy import isprime, nextprime
def A243761_gen(): # generator of terms
p, q = 2, 3
while True:
if isprime(r:=p*(p+q)+q**2):
yield r
p, q = q, nextprime(q)
CROSSREFS
KEYWORD
nonn
AUTHOR
K. D. Bajpai, Jun 10 2014
STATUS
approved
