OFFSET
0,14
LINKS
Alois P. Heinz and Donovan Johnson, Table of n, a(n) for n = 0..1000 (terms up to a(300) from Alois P. Heinz)
FORMULA
a(n) = A025443(n^2).
EXAMPLE
a(9)=1 refers to the partition 9^2 = 2^2+4^2+5^2+6^2. a(11)=1 refers to 11^2 = 1^2+2^2+4^2+10^2. a(13)=2 refers to 13^2 = 1^2+2^2+8^2+10^2 = 2^2+4^2+7^2+10^2.
MAPLE
A025443 := proc(n) local res, a, b, c, d ; res := 0 ; for a from 1 do if 4*a^2 > n then break; fi; for b from a+1 do if a^2+3*b^2 > n then break; fi; for c from b+1 do if a^2+b^2+2*c^2 > n then break; fi; for d from c+1 do if a^2+b^2+c^2+d^2 > n then break; elif a^2+b^2+c^2+d^2 = n then res := res+1 ; fi ; end do; end do; end do: end do: res ; end proc:
A := proc(n) A025443(n^2) ; end proc: seq(A(n), n=0..60) ;
# second Maple program:
b:= proc(n, i, t) option remember; `if`(n=0, `if`(t=0, 1, 0),
`if`(t*i^2<n, 0, `if`(i=1, 0, b(n, i-1, t))+
`if`(i^2>n, 0, b(n-i^2, i-1, t-1))))
end:
a:= n-> b(n^2, n, 4):
seq(a(n), n=0..80); # Alois P. Heinz, Feb 07 2013
MATHEMATICA
b[n_, i_, t_] := b[n, i, t] = If[n == 0, If[t == 0, 1, 0], If[t*i^2 < n, 0, If[i == 1, 0, b[n, i-1, t]] + If[i^2 > n, 0, b[n-i^2, i-1, t-1]]]]; a[n_] := b[n^2, n, 4]; Table[a[n], {n, 0, 80}] (* Jean-François Alcover, Jun 24 2015, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn,look
AUTHOR
R. J. Mathar, Oct 30 2010
EXTENSIONS
More terms from Alois P. Heinz, Feb 07 2013
STATUS
approved