OFFSET
1,1
COMMENTS
All k <= 310 yield provable primes.
Write the sum as S(2,k)-1, where S(m,k) = Sum_{i=0..k} (i!)^m. Let p=1248829. Because p divides S(2,p-1)-1, p divides S(2,k)-1 for all k >= p-1. Hence there are no primes for k >= p-1.
LINKS
Eric Weisstein's World of Mathematics, Factorial Sums
Eric Weisstein's World of Mathematics, Integer Sequence Primes
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 *)
PROG
(PARI) is(n)=ispseudoprime(sum(k=1, n, k!^2)) \\ Charles R Greathouse IV, Apr 14 2015
CROSSREFS
KEYWORD
nonn,fini,more
AUTHOR
T. D. Noe, Nov 11 2004 and Dec 11 2004
EXTENSIONS
a(18) from T. D. Noe, Feb 15 2006
a(19) from Serge Batalov, Jul 29 2017
STATUS
approved