%I #18 Sep 08 2022 08:44:59
%S 2,5,37,577,14401,131681894401,13168189440001,1593350922240001,
%T 38775788043632640001,384956219213331276939737002152967117209600000001
%N Primes of the form (n!)^2 + 1.
%H Vincenzo Librandi, <a href="/A051739/b051739.txt">Table of n, a(n) for n = 1..12</a>
%e 37 is a term because it is prime and is (3!)^2 + 1.
%t lst={};Do[s=n!^2;If[PrimeQ[p=s+1], AppendTo[lst, p]], {n, 5!}];lst (* _Vladimir Joseph Stephan Orlovsky_, Sep 27 2008 *)
%t Select[Table[(n!)^2+1,{n,1,5000}],PrimeQ] (* _Vincenzo Librandi_, Dec 08 2011 *)
%o (Magma) [a: n in [1..50] | IsPrime(a) where a is Factorial(n)^2+1]; // _Vincenzo Librandi_, Dec 08 2011
%Y Cf. A046029. Primes in A020549.
%K nonn
%O 1,1
%A _G. L. Honaker, Jr._, Dec 06 1999
%E More terms from _James A. Sellers_, Dec 08 1999