OFFSET
1,1
COMMENTS
LINKS
Pierre CAMI, Table of n, a(n) for n = 1..50000
EXAMPLE
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.
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 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Pierre CAMI, May 11 2017
STATUS
approved