OFFSET
1,2
PROG
(Python)
import math
factorials = [1] * 1024
f = 1
for n in range(2, 1025):
f *= n
factorials[n-1] = f
for n in range(1<<30):
t = n*n
for a in factorials:
r = t - a
if r<0: break
b = int(math.sqrt(2*r))
if b*(b+1)==r*2:
print(t, end=', ')
break
CROSSREFS
KEYWORD
nonn
AUTHOR
Alex Ratushnyak, Oct 17 2013
STATUS
approved