A100289 Numbers k such that (1!)^2 + (2!)^2 + (3!)^2 + ... + (k!)^2 is prime.
2, 3, 4, 5, 7, 8, 10, 18, 21, 42, 51, 91, 133, 177, 182, 310, 3175, 9566, 32841
Offset: 1
Links
- Eric Weisstein's World of Mathematics, Factorial Sums
- Eric Weisstein's World of Mathematics, Integer Sequence Primes
Crossrefs
Programs
-
Maple
L:= [seq((i!)^2, i=1..1000)]: S:= ListTools:-PartialSums(L): select(t -> isprime(S[t]), [$1..1000]); # Robert Israel, Jul 17 2017
-
Mathematica
Select[Range[200], PrimeQ[Total[Range[#]!^2]] &] Module[{nn=350,tt},tt=Accumulate[(Range[nn]!)^2];Position[tt,?PrimeQ]]//Flatten (* The program generates the first 16 terms of the sequence. *) (* _Harvey P. Dale, Oct 12 2023 *)
-
PARI
is(n)=ispseudoprime(sum(k=1,n,k!^2)) \\ Charles R Greathouse IV, Apr 14 2015
Extensions
a(18) from T. D. Noe, Feb 15 2006
a(19) from Serge Batalov, Jul 29 2017
Comments