Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #16 Sep 08 2022 08:45:54
%S 4,6,8,10,13,17,18,21,22,25,30,34,36,38,41,42,45,46,56,57,58,62,64,69,
%T 70,72,74,86,88,101,105,113,114,116,120,122,126,132,133,141,157,158,
%U 174,176,181,182,186,192,198,200,205,216,217,221,224,240,253,254
%N Numbers n such that (n-1)*n^2/2-1 is prime.
%H G. C. Greubel, <a href="/A182091/b182091.txt">Table of n, a(n) for n = 1..5000</a>
%e 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.
%t Select[Range[300], PrimeQ[(# - 1)*#^2/2 - 1] &] (* _T. D. Noe_, Apr 11 2012 *)
%o (PARI) is(n)=isprime((n-1)*n^2/2-1) \\ _Charles R Greathouse IV_, Jun 13 2017
%o (Magma) [n: n in [1..300] |IsPrime((n-1)*n^2 div 2-1)]; // _Vincenzo Librandi_, Aug 21 2017
%Y Cf. A006002.
%K nonn,easy
%O 1,1
%A _Gerasimov Sergey_, Apr 11 2012