OFFSET
1,1
COMMENTS
The primes are (sum of numbers from 1 to k)/2 + or - 1.
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
EXAMPLE
3*4/4 = 3, 3-1 = 2 is prime so a(1) = 3.
7*8/4 = 14, 14-1 = 13 is prime so a(2) = 7.
8*9/4 = 18, 18-1 = 17 is prime, 18+1 = 19 is prime, so a(3) = 8.
MATHEMATICA
Select[Range[300], Or @@ PrimeQ[#*(#+1)/4 + {-1, 1}] &] (* Amiram Eldar, Jul 18 2021 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Pierre CAMI, Apr 11 2005
EXTENSIONS
More terms from Amiram Eldar, Jul 18 2021
STATUS
approved