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

%I #26 Sep 08 2022 08:46:21

%S 4,10,14,20,84,110,120,124,150,170,204,224,230,250,264,300,400,430,

%T 464,490,570,674,680,690,930,960,1004,1054,1060,1140,1144,1150,1314,

%U 1410,1434,1550,1564,1570,1580,1654,1784,1870,1964,1974,2050,2074,2080,2120,2260,2304,2314

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

%H Chai Wah Wu, <a href="/A302087/b302087.txt">Table of n, a(n) for n = 1..10000</a>

%p select(k->isprime(k^2+1) and isprime((k+6)^2+1),[$1..3000]); # _Muniru A Asiru_, Apr 02 2018

%t Select[Range[3000], PrimeQ[#^2 + 1] && PrimeQ[(# + 6)^2 + 1]&] (* _Vincenzo Librandi_, Apr 02 2018 *)

%o (Python)

%o from sympy import isprime

%o k, klist, A302087_list = 0, [isprime(i**2+1) for i in range(6)], []

%o while len(A302087_list) < 10000:

%o i = isprime((k+6)**2+1)

%o if klist[0] and i:

%o A302087_list.append(k)

%o k += 1

%o klist = klist[1:] + [i] # _Chai Wah Wu_, Apr 01 2018

%o (Magma) [n: n in [1..2500] | IsPrime(n^2+1) and IsPrime((n+6)^2+1)]; // _Vincenzo Librandi_, Apr 02 2018

%o (PARI) isok(k) = isprime(k^2+1) && isprime((k+6)^2+1); \\ _Altug Alkan_, Apr 02 2018

%Y Cf. A005574, A023201, A096012, A302021.

%K nonn

%O 1,1

%A _Seiichi Manyama_, Mar 31 2018

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 19 09:23 EDT 2024. Contains 371782 sequences. (Running on oeis4.)