OFFSET
1,1
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..5000
EXAMPLE
a(1)=4 because (4-1)*4^2/2-1=23 is prime, a(2)=6 because (6-1)*6^2/2-1=89 is prime.
MATHEMATICA
Select[Range[300], PrimeQ[(# - 1)*#^2/2 - 1] &] (* T. D. Noe, Apr 11 2012 *)
PROG
(PARI) is(n)=isprime((n-1)*n^2/2-1) \\ Charles R Greathouse IV, Jun 13 2017
(Magma) [n: n in [1..300] |IsPrime((n-1)*n^2 div 2-1)]; // Vincenzo Librandi, Aug 21 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Gerasimov Sergey, Apr 11 2012
STATUS
approved