OFFSET
0,4
COMMENTS
LINKS
Kenny Lau, Table of n, a(n) for n = 0..20000
PROG
(Python)
f = open('b110534.txt', 'w')
N = 20000
n = 1
t = [0] #triangular numbers
while t[-1] <= N:
....t += [t[-1]+n]
....n += 1
t = t[:-1]
a = [0]*(N+1) #the sequence
length = len(t)
for i in range(length):
....for j in range(i, length):
........p = t[i] + t[j]
........if p > N: continue
........for k in range(j, length):
............q = p + t[k]
............if q > N: continue
............for l in range(k, length):
................r = q + t[l]
................if r > N: continue
................for m in range(l, length):
....................s = r + t[m]
....................if s > N: break
....................else: a[s] += 1
for index, value in enumerate(a):
....f.write(str(index)+" "+str(value)+"\n")
f.close()
# Kenny Lau, Jul 05 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
Philippe Deléham, Sep 03 2005
EXTENSIONS
More terms from Don Reble, Sep 17 2005
STATUS
approved