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

A025436
Number of partitions of n into 3 distinct squares.
2
0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 2, 0, 0, 2, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 2, 1, 0, 0, 2, 1, 0, 0, 1, 2, 0, 1, 2, 1, 0, 1, 0, 1, 1, 0, 2, 2, 0, 0, 3, 1, 0, 1, 2, 1, 0, 0, 1, 3, 1, 0, 2, 1, 0, 1, 1, 1, 1, 1, 2, 2, 0, 0, 3, 3, 1, 0, 1, 2, 0, 0, 1, 2, 0, 1, 4, 0, 0, 2, 2, 2, 1
OFFSET
0,27
LINKS
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
Sequence in context: A079181 A093693 A224447 * A373954 A170976 A134109
KEYWORD
nonn
STATUS
approved