login
A110534
Number of ways of writing 8n+5 as a sum of 5 odd squares.
4
1, 1, 1, 2, 2, 2, 3, 3, 2, 4, 4, 3, 5, 5, 4, 6, 6, 4, 7, 7, 5, 8, 8, 7, 9, 9, 6, 10, 10, 8, 11, 11, 10, 12, 13, 8, 13, 14, 11, 14, 14, 12, 15, 16, 12, 16, 18, 14, 18, 18, 14, 20, 20, 14, 19, 20, 16, 21, 24, 19, 21, 24, 18, 23, 24, 20, 24, 27, 23, 26, 25, 20, 29, 30, 23, 25, 31, 26
OFFSET
0,4
COMMENTS
a(n) is also the number of ways of writing n as a sum of 5 triangular numbers (A000217). - Kenny Lau, Jul 05 2016
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
Cf. A004770.
Sequence in context: A331415 A295511 A116505 * A194340 A194288 A360058
KEYWORD
nonn
AUTHOR
Philippe Deléham, Sep 03 2005
EXTENSIONS
More terms from Don Reble, Sep 17 2005
STATUS
approved