login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
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
Sequence in context: A310422 A310423 A114335 * A329103 A099355 A161366
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Mar 31 2018
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 17:10 EDT 2024. Contains 371962 sequences. (Running on oeis4.)