OFFSET
1,3
COMMENTS
Numbers k such that k! is representable as a sum of a square and a triangular number are listed in A394730.
k! is a term iff each prime factor congruent to 5 or 7 (mod 8) of 8*k!+1 comes in even degree. - Max Alekseyev, Mar 30 2026
1! = 1/2*1*(1+1), 3! = 1/2*3*(3+1) and 5! = 1/2*15*(15+1)/2 are triangular terms of the sequence. Next such term, if it exists is greater than 10000!. - Farideh Firoozbakht, Oct 18 2013
LINKS
Max Alekseyev, Table of n, a(n) for n = 1..31
FORMULA
a(n) = A394730(n)!. - Max Alekseyev, Mar 30 2026
EXAMPLE
13! = 66708^2+(1/2)*59616*(59616+1) = 78693^2+(1/2)*8298*(8298+1), so 13! = 6227020800 is in the sequence. What is the next term of the sequence which has more than one representation of the form b^2 + triangular(c)? - Farideh Firoozbakht, Oct 18 2013
PROG
(Python)
import math
f=1
for n in range(1, 1000000):
f *= n
t = b = 0
while t<=f:
x = f-t
a = math.isqrt(x)
if a*a==x:
print(f, end=", ")
break
b += 1
t = b*(b+1)//2
CROSSREFS
KEYWORD
nonn
AUTHOR
Alex Ratushnyak, Oct 17 2013
EXTENSIONS
Initial 1 added by Farideh Firoozbakht, Oct 18 2013
Terms a(14) onward from Max Alekseyev, Mar 30 2026
STATUS
approved
