OFFSET
1,1
EXAMPLE
139128 is both 527*528/2 and 373^2 - 1 (and 373 is prime).
MATHEMATICA
Select[Prime[Range[100000]]^2-1, OddQ[Sqrt[8#+1]]&] (* The program generates the first six terms of the sequence. *) (* Harvey P. Dale, Sep 17 2023 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Shreevatsa R, Jul 12 2013
EXTENSIONS
a(7)-a(8) from Giovanni Resta, Jul 13 2013
STATUS
approved