A025443 Number of partitions of n into 4 distinct nonzero squares.
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 3, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, 2, 1, 0, 1, 2, 2, 0, 0, 1, 2, 0, 0, 3, 0, 0, 2, 1, 1
Offset: 0
Links
Crossrefs
Programs
-
Maple
b:= proc(n,i,t) option remember; `if`(n=0, `if`(t=0,1,0), `if`(t*i^2
n, 0, b(n-i^2,i-1,t-1)))) end: a:= n-> b(n, isqrt(n), 4): seq(a(n), n=0..150); # 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, b[n-i^2, i-1, t-1]]]]; a[n_] := b[n, Sqrt[n] // Floor, 4]; Table[a[n], {n, 0, 150}] (* Jean-François Alcover, Feb 29 2016, after Alois P. Heinz*) dnzs[n_]:=Length[Select[IntegerPartitions[n,{4}],Length[Union[#]]==4&&AllTrue[ Sqrt[ #], IntegerQ] && FreeQ[#,0]&]]; Array[dnzs,110,0] (* Harvey P. Dale, Jun 09 2024 *)
Formula
a(n) = [x^n y^4] Product_{k>=1} (1 + y*x^(k^2)). - Ilya Gutkovskiy, Apr 22 2019