A051739 Primes of the form (n!)^2 + 1.
2, 5, 37, 577, 14401, 131681894401, 13168189440001, 1593350922240001, 38775788043632640001, 384956219213331276939737002152967117209600000001
Offset: 1
Keywords
Examples
37 is a term because it is prime and is (3!)^2 + 1.
Links
- Vincenzo Librandi, Table of n, a(n) for n = 1..12
Programs
-
Magma
[a: n in [1..50] | IsPrime(a) where a is Factorial(n)^2+1]; // Vincenzo Librandi, Dec 08 2011
-
Mathematica
lst={};Do[s=n!^2;If[PrimeQ[p=s+1], AppendTo[lst, p]], {n, 5!}];lst (* Vladimir Joseph Stephan Orlovsky, Sep 27 2008 *) Select[Table[(n!)^2+1,{n,1,5000}],PrimeQ] (* Vincenzo Librandi, Dec 08 2011 *)
Extensions
More terms from James Sellers, Dec 08 1999