login
A302087
Numbers k such that k^2+1 and (k+6)^2+1 are both prime.
2
4, 10, 14, 20, 84, 110, 120, 124, 150, 170, 204, 224, 230, 250, 264, 300, 400, 430, 464, 490, 570, 674, 680, 690, 930, 960, 1004, 1054, 1060, 1140, 1144, 1150, 1314, 1410, 1434, 1550, 1564, 1570, 1580, 1654, 1784, 1870, 1964, 1974, 2050, 2074, 2080, 2120, 2260, 2304, 2314
OFFSET
1,1
MAPLE
select(k->isprime(k^2+1) and isprime((k+6)^2+1), [$1..3000]); # Muniru A Asiru, Apr 02 2018
MATHEMATICA
Select[Range[3000], PrimeQ[#^2 + 1] && PrimeQ[(# + 6)^2 + 1]&] (* Vincenzo Librandi, Apr 02 2018 *)
PROG
(Python)
from sympy import isprime
k, klist, A302087_list = 0, [isprime(i**2+1) for i in range(6)], []
while len(A302087_list) < 10000:
i = isprime((k+6)**2+1)
if klist[0] and i:
A302087_list.append(k)
k += 1
klist = klist[1:] + [i] # Chai Wah Wu, Apr 01 2018
(Magma) [n: n in [1..2500] | IsPrime(n^2+1) and IsPrime((n+6)^2+1)]; // Vincenzo Librandi, Apr 02 2018
(PARI) isok(k) = isprime(k^2+1) && isprime((k+6)^2+1); \\ Altug Alkan, Apr 02 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Mar 31 2018
STATUS
approved