login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A096012 Numbers k such that k^2+1 and (k+2)^2+1 are both prime; twin k^2+1 primes. 12

%I

%S 2,4,14,24,54,124,204,384,464,634,644,714,1094,1144,1174,1244,1274,

%T 1314,1374,1564,1614,1674,1684,1964,2054,2084,2094,2404,2454,2534,

%U 2664,2834,2924,3134,3304,3534,3754,3774,4024,4154,4174,4364,4604,4614,4734,4784

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

%H Amiram Eldar, <a href="/A096012/b096012.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..1000 from Seiichi Manyama)

%F a(k) = A108814(k) - 1. - _Jeppe Stig Nielsen_, Feb 26 2016

%t Select[Range[5000],AllTrue[{#^2+1,(#+2)^2+1},PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* _Harvey P. Dale_, Jul 23 2014 *)

%t Select[Range[5000], PrimeQ[#^2 + 1] && PrimeQ[(# + 2)^2 + 1] &] (* _Vincenzo Librandi_, Feb 27 2016 *)

%o (MAGMA) [n: n in [1..5000] | IsPrime(n^2+1) and IsPrime((n+2)^2+1)]; // _Vincenzo Librandi_, Feb 27 2016

%o (PARI) isok(n) = isprime(n^2+1) && isprime((n+2)^2+1); \\ _Michel Marcus_, Feb 27 2016

%Y Cf. A005574, A108814.

%K easy,nonn

%O 1,1

%A _Jason Earls_, Jul 20 2004

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 7 10:14 EST 2021. Contains 341869 sequences. (Running on oeis4.)