A025436 Number of partitions of n into 3 distinct squares.
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
Keywords
Links
- Robert Israel, Table of n, a(n) for n = 0..10000
Programs
-
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 *)
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