cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A302087 Numbers k such that k^2+1 and (k+6)^2+1 are both prime.

This page as a plain text file.
%I A302087 #26 Sep 08 2022 08:46:21
%S A302087 4,10,14,20,84,110,120,124,150,170,204,224,230,250,264,300,400,430,
%T A302087 464,490,570,674,680,690,930,960,1004,1054,1060,1140,1144,1150,1314,
%U A302087 1410,1434,1550,1564,1570,1580,1654,1784,1870,1964,1974,2050,2074,2080,2120,2260,2304,2314
%N A302087 Numbers k such that k^2+1 and (k+6)^2+1 are both prime.
%H A302087 Chai Wah Wu, <a href="/A302087/b302087.txt">Table of n, a(n) for n = 1..10000</a>
%p A302087 select(k->isprime(k^2+1) and isprime((k+6)^2+1),[$1..3000]); # _Muniru A Asiru_, Apr 02 2018
%t A302087 Select[Range[3000], PrimeQ[#^2 + 1] && PrimeQ[(# + 6)^2 + 1]&] (* _Vincenzo Librandi_, Apr 02 2018 *)
%o A302087 (Python)
%o A302087 from sympy import isprime
%o A302087 k, klist, A302087_list = 0, [isprime(i**2+1) for i in range(6)], []
%o A302087 while len(A302087_list) < 10000:
%o A302087     i = isprime((k+6)**2+1)
%o A302087     if klist[0] and i:
%o A302087         A302087_list.append(k)
%o A302087     k += 1
%o A302087     klist = klist[1:] + [i] # _Chai Wah Wu_, Apr 01 2018
%o A302087 (Magma) [n: n in [1..2500] | IsPrime(n^2+1) and IsPrime((n+6)^2+1)]; // _Vincenzo Librandi_, Apr 02 2018
%o A302087 (PARI) isok(k) = isprime(k^2+1) && isprime((k+6)^2+1); \\ _Altug Alkan_, Apr 02 2018
%Y A302087 Cf. A005574, A023201, A096012, A302021.
%K A302087 nonn
%O A302087 1,1
%A A302087 _Seiichi Manyama_, Mar 31 2018