OFFSET
1,1
COMMENTS
Equal to primes of the form (k^2-17)/8. Also equal to primes p such that 8*p+17 is a square. - Chai Wah Wu, Jul 14 2014
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..2000.
EXAMPLE
The (first five triangular numbers)-2 are: -1,1,4,8,13. So a(1)=13 is the first prime of this form.
MATHEMATICA
Pick[ #1, PrimeQ[ #1]]&[((1/2)*#1*(#1 + 1) - 2 & ) /@ Range[180]]
Select[Accumulate[Range[250]]-2, PrimeQ] (* Harvey P. Dale, Jun 07 2020 *)
PROG
(Python)
import sympy
[n*(n+1)/2-2 for n in range(10**6) if isprime(n*(n+1)/2-2)] # Chai Wah Wu, Jul 14 2014
(PARI) isok(p) = isprime(p) && ispolygonal(p+2, 3); \\ Michel Marcus, Sep 19 2022
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Peter Pein (petsie(AT)dordos.net), Dec 07 2006
STATUS
approved