cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A082920 Squares that are the sum of four factorials.

This page as a plain text file.
%I A082920 #11 Dec 23 2024 21:52:21
%S A082920 4,9,16,169,361,729,961,1444,10201,403225,725904
%N A082920 Squares that are the sum of four factorials.
%e A082920 These appear to be the only solutions to a! + b! + c! + d! = n^2:
%e A082920 a b c d n
%e A082920 0 0 0 0 4
%e A082920 0 0 0 1 4
%e A082920 0 0 0 3 9
%e A082920 0 0 1 1 4
%e A082920 0 0 1 3 9
%e A082920 0 1 1 1 4
%e A082920 0 1 1 3 9
%e A082920 0 2 3 6 729
%e A082920 0 4 4 5 169
%e A082920 0 4 8 9 403225
%e A082920 0 5 5 5 361
%e A082920 0 5 5 6 961
%e A082920 0 5 7 7 10201
%e A082920 1 1 1 1 4
%e A082920 1 1 1 3 9
%e A082920 1 2 3 6 729
%e A082920 1 4 4 5 169
%e A082920 1 4 8 9 403225
%e A082920 1 5 5 5 361
%e A082920 1 5 5 6 961
%e A082920 1 5 7 7 10201
%e A082920 2 2 3 3 16
%e A082920 2 2 6 6 1444
%e A082920 4 5 9 9 725904
%e A082920 1!+2!+3!+6! = 729 = 27^2. This shows that 4 factorials can add to a cube.
%p A082920 S:= {}:
%p A082920 N:= 100: # for terms < (N+1)!
%p A082920 F:= [seq(i!,i=1..N)]:
%p A082920 for a from 1 to N do
%p A082920   for b from a to N do
%p A082920    for c from b to N do
%p A082920      for d from c to N do
%p A082920      if issqr(F[a]+F[b]+F[c]+F[d]) then
%p A082920        S:= S union {F[a]+F[b]+F[c]+F[d]}
%p A082920 fi od od od od:
%p A082920 sort(convert(S,list)); # _Robert Israel_, Dec 23 2024
%t A082920 e = 75; a = Union[ Flatten[ Table[a! + b! + c! + d!, {a, 1, e}, {b, a, e}, {c, b, e}, {d, c, e}]]]; l = Length[a]; Do[ If[ IntegerQ[ Sqrt[ a[[i]] ]], Print[ a[[i]] ]], {i, 1, l}]
%t A082920 Select[Union[Total/@Tuples[Range[10]!,4]],IntegerQ[Sqrt[#]]&] (* _Harvey P. Dale_, Aug 23 2014 *)
%o A082920 (PARI) sum4factsq(n) = { for(a1=0,n, for(a2=a1,n, for(a3=a2,n, for(a4=a3,n, z = a1!+a2!+a3!+a4!; if(issquare(z),print(a1" "a2" "a3" "a4" "z)) ) ) ) ) }
%Y A082920 Cf. A082875.
%K A082920 nonn
%O A082920 1,1
%A A082920 _Cino Hilliard_, May 25 2003
%E A082920 Edited, corrected and extended by _Robert G. Wilson v_, May 26 2003
%E A082920 Offset corrected by _Robert Israel_, Dec 23 2024