%I #22 Oct 19 2017 03:14:42
%S 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,
%T 10,12,13,8,13,14,11,14,14,12,15,16,12,16,18,14,18,18,14,20,20,14,19,
%U 20,16,21,24,19,21,24,18,23,24,20,24,27,23,26,25,20,29,30,23,25,31,26
%N Number of ways of writing 8n+5 as a sum of 5 odd squares.
%C a(n) is also the number of ways of writing n as a sum of 5 triangular numbers (A000217). - _Kenny Lau_, Jul 05 2016
%H Kenny Lau, <a href="/A110534/b110534.txt">Table of n, a(n) for n = 0..20000</a>
%o (Python)
%o f = open('b110534.txt', 'w')
%o N = 20000
%o n = 1
%o t = [0] #triangular numbers
%o while t[-1] <= N:
%o ....t += [t[-1]+n]
%o ....n += 1
%o t = t[:-1]
%o a = [0]*(N+1) #the sequence
%o length = len(t)
%o for i in range(length):
%o ....for j in range(i,length):
%o ........p = t[i] + t[j]
%o ........if p > N: continue
%o ........for k in range(j,length):
%o ............q = p + t[k]
%o ............if q > N: continue
%o ............for l in range(k,length):
%o ................r = q + t[l]
%o ................if r > N: continue
%o ................for m in range(l,length):
%o ....................s = r + t[m]
%o ....................if s > N: break
%o ....................else: a[s] += 1
%o for index,value in enumerate(a):
%o ....f.write(str(index)+" "+str(value)+"\n")
%o f.close()
%o # _Kenny Lau_, Jul 05 2016
%Y Cf. A004770.
%K nonn
%O 0,4
%A _Philippe Deléham_, Sep 03 2005
%E More terms from _Don Reble_, Sep 17 2005
|