login
A394730
Numbers k such that k! is the sum of a square and a triangular number.
1
0, 1, 2, 3, 4, 5, 9, 10, 11, 12, 13, 15, 19, 23, 25, 27, 31, 35, 43, 46, 47, 48, 53, 54, 57, 58, 60, 69, 71, 78, 83
OFFSET
1,3
FORMULA
k is a term iff each prime factor congruent to 5 or 7 (mod 8) of 8*k!+1 comes in even degree.
PROG
(Python)
from math import factorial
from itertools import count, islice
from sympy.solvers.diophantine.diophantine import diop_quadratic
from sympy.abc import x, y
def A394730_gen(startvalue=0): # generator of terms >= startvalue
return filter(lambda k:bool(len(diop_quadratic(2*(factorial(k)-x**2)-y*(y+1)))), count(max(startvalue, 0)))
A394730_list = list(islice(A394730_gen(), 20)) # Chai Wah Wu, Mar 31 2026
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Max Alekseyev, Mar 30 2026
STATUS
approved