A286319 Prime p such that p^2-p-1 or p^2+p-1 is the smallest prime of a twin prime pair.
2, 3, 5, 7, 41, 59, 67, 89, 101, 131, 139, 379, 457, 743, 761, 1193, 1201, 1381, 1549, 1567, 1747, 1789, 2137, 2411, 2557, 2647, 2663, 2729, 2731, 3011, 3221, 3251, 3449, 4057, 4159, 4447, 4561, 4751, 5179, 5641, 6173, 6397, 6599, 6833, 7229, 8669, 9059, 9157, 9323
Offset: 1
Keywords
Examples
2^2+2-1=5 and (5,7) is a twin prime pair so a(1)=2. 3^2-3-1=5, 3^2+3-1=11 and (5,7), (11,13) are twin prime pairs so a(2)=3. 5^2+5-1=29 and (29,31) is a twin prime pair so a(3)=5. 7^2-7-1=41 and (41,43) is a twin prime pair so a(4)=7.
Links
- Pierre CAMI, Table of n, a(n) for n = 1..50000
Programs
-
Mathematica
sptppQ[n_]:=AllTrue[{n^2-n-1,n^2-n+1},PrimeQ]||AllTrue[{n^2+n-1,n^2+ n+ 1},PrimeQ]; Select[Prime[Range[1200]],sptppQ] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, May 04 2019 *)
Comments