login
Total number of parts in all partitions of n^2 into squares.
3

%I #28 Dec 07 2016 02:37:27

%S 0,1,5,19,64,206,616,1766,4836,12910,33248,83768,205693,495357,

%T 1169030,2713262,6193247,13932454,30905452,67684181,146439145,

%U 313266730,663004212,1389106622,2882712626,5928222338,12086570971,24440494114,49035791349,97646904849

%N Total number of parts in all partitions of n^2 into squares.

%H Alois P. Heinz and Vaclav Kotesovec, <a href="/A229239/b229239.txt">Table of n, a(n) for n = 0..689</a> (terms 0..200 from Alois P. Heinz)

%H Christopher Hunt Gribble, <a href="/A229239/a229239.cpp.txt">C++ program</a>

%e a(2) = 5 because there are 5 parts in the set of partitions of 2^2 into squares. The partitions are (1 2 X 2 square) and (4 1 X 1 squares) giving 5 parts in all.

%p b:= proc(n, i) option remember; `if`(n=0, [1, 0], `if`(i<1, [0$2],

%p b(n, i-1)+`if`(i^2>n, [0$2], (g->g+[0, g[1]])(b(n-i^2, i)))))

%p end:

%p a:= n-> b(n^2, n)[2]:

%p seq(a(n), n=0..40); # _Alois P. Heinz_, Sep 23 2013

%t b[n_, i_] := b[n, i] = If[n == 0, {1, 0}, If[i<1, {0, 0}, b[n, i-1] + If[ i^2 > n, {0, 0}, Function[g, g + {0, g[[1]]}][b[n - i^2, i]]]]]; a[n_] := b[n^2, n][[2]]; Table[a[n], {n, 0, 40}] (* _Jean-François Alcover_, Nov 11 2015, after _Alois P. Heinz_ *)

%Y Row sums of A229468.

%Y Cf. A037444.

%K nonn

%O 0,3

%A _Christopher Hunt Gribble_, Sep 23 2013