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”).

A230365
Squares representable as b! + triangular(c).
0
1, 4, 9, 16, 25, 121, 144, 196, 225, 256, 324, 441, 529, 900, 1296, 4096, 4489, 5041, 5476, 6561, 7056, 10609, 14884, 15625, 17956, 28561, 42025, 44100, 46656, 53361, 136900, 139129, 143641, 152100, 184041, 220900, 222784, 360000, 370881, 404496, 443556, 505521, 609961
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