login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A100289
Numbers k such that (1!)^2 + (2!)^2 + (3!)^2 + ... + (k!)^2 is prime.
8
2, 3, 4, 5, 7, 8, 10, 18, 21, 42, 51, 91, 133, 177, 182, 310, 3175, 9566, 32841
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
Cf. A100288 (primes of the form (1!)^2 + (2!)^2 + (3!)^2 +...+ (k!)^2).
Cf. A061062 ((0!)^2 + (1!)^2 + (2!)^2 + (3!)^2 +...+ (n!)^2).
Cf. A289947 (k!^6), A290014 (k!^10).
Cf. also A104344.
Sequence in context: A034296 A075745 A214036 * A255130 A054021 A066191
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