OFFSET
0,27
LINKS
Robert Israel, Table of n, a(n) for n = 0..10000
FORMULA
G.f.: (1+theta_3(x))^3/48 - (1+theta_3(x))*(1+theta_3(x^2))/8 + (1 + theta_3(x^3))/6, where theta_3 is a Jacobi theta function. - Robert Israel, Nov 11 2015
MAPLE
N:= 1000; # to get a(0) to a(N)
A:= Vector(N+1);
for a from 2 to floor(sqrt(N)) do
for b from 1 to min(a-1, floor(sqrt(N-a^2))) do
for c from 0 to min(b-1, floor(sqrt(N-a^2-b^2))) do
x:= a^2 + b^2 + c^2;
A[x+1]:= A[x+1]+1
od od od:
convert(A, list); # Robert Israel, Nov 11 2015
MATHEMATICA
n = 100; Clear[A]; A[_] = 0; For[a = 2, a <= Floor[Sqrt[n]], a++, For[b = 1, b <= Min[a-1, Floor[Sqrt[n-a^2]]], b++, For[c = 0, c <= Min[b-1, Floor[Sqrt[n-a^2-b^2]]], c++, x = a^2 + b^2 + c^2; A[x+1] = A[x+1]+1]]]; Array[A, n] (* Jean-François Alcover, Nov 11 2015, adapted from Robert Israel's Maple script *)
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved