%I #18 Feb 15 2021 11:15:08
%S 1,2,8,1849,22912,40328,646912,3607298,6323422,7520900,8962893,
%T 23879700,38043325,157944268,1105942626,3604734726,5239828426,
%U 8179002096,8179002106,37234260225
%N Numbers k such that k*(prime(k) - 1) is a square.
%C Next term is > 2.5*10^10. - _Ryan Propper_, Nov 10 2006
%C a(21) > pi(10^12). - _Donovan Johnson_, Feb 26 2010
%e 7520900*(prime(7520900) - 1) = 997787845328400 = 31587780^2 is a perfect square, so 7520900 is in the sequence.
%t Do[k = n*Prime[n] - n; If[IntegerQ[Sqrt[k]], Print[n]], {n, 1, 670000000}] (* _Ryan Propper_, Aug 24 2005 *)
%o (PARI) isok(k) = issquare(k*(prime(k)-1)); \\ _Michel Marcus_, Feb 15 2021
%K nonn,hard,more
%O 1,2
%A _Benoit Cloitre_, Aug 29 2002
%E More terms from _Ryan Propper_, Aug 24 2005
%E More terms from _Ryan Propper_, Nov 10 2006
%E a(20) from _Donovan Johnson_, Feb 26 2010
|