A265006 Twin prime pairs of the form (k^2 + k - 1, k^2 + k + 1).
5, 7, 11, 13, 29, 31, 41, 43, 71, 73, 239, 241, 419, 421, 461, 463, 599, 601, 1481, 1483, 1721, 1723, 2549, 2551, 2969, 2971, 3539, 3541, 4421, 4423, 8009, 8011, 10301, 10303, 17291, 17293, 19181, 19183, 20021, 20023, 23561, 23563, 24179, 24181, 27059, 27061, 31151, 31153, 35531, 35533
Offset: 1
Examples
For k = 6, k^2 + k = 6^2 + 6 = 42, and (41,43) is a twin prime pair, so 41 and 43 are in the sequence.
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000 (terms 1..3594 from G. C. Greubel)
Programs
-
Magma
&cat[[n^2+n-1, n^2+n+1]: n in [0..250]| IsPrime(n^2+n-1) and IsPrime(n^2+n+1)]; // Vincenzo Librandi, Feb 05 2017
-
Mathematica
{#^2 + # - 1, #^2 + # + 1} & /@ Select[Range@ 200, PrimeQ[#^2 + # - 1] && PrimeQ[#^2 + # + 1] &] // Flatten (* Michael De Vlieger, Nov 30 2015 *) Flatten[Select[Table[n^2 + n + {-1, 1}, {n, 0, 200}], And@@PrimeQ[#] &]] (* Vincenzo Librandi, Feb 05 2017 *)
-
PARI
genit()={my(maxx=1000);n=0;while(n
Formula
a(2n-1) = A088486(n). a(2n)=2+a(2n-1).
Comments