OFFSET
1,1
COMMENTS
The twin primes are = (sum of numbers from 1 to k)/2 -1 and +1.
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000 (terms 1..1000 from Harvey P. Dale)
EXAMPLE
8*9/4=18, 17 and 19 twin primes so a(1)=8
15*16/4=60, 59 and 61 twin primes so a(2)=15
MATHEMATICA
Select[Range[2200], AllTrue[(#(#+1))/4+{1, -1}, PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Aug 01 2015 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Pierre CAMI, Apr 11 2005
EXTENSIONS
More terms from Zak Seidov, Oct 07 2009
STATUS
approved