A229239 Total number of parts in all partitions of n^2 into squares.
0, 1, 5, 19, 64, 206, 616, 1766, 4836, 12910, 33248, 83768, 205693, 495357, 1169030, 2713262, 6193247, 13932454, 30905452, 67684181, 146439145, 313266730, 663004212, 1389106622, 2882712626, 5928222338, 12086570971, 24440494114, 49035791349, 97646904849
Offset: 0
Keywords
Examples
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.
Links
- Alois P. Heinz and Vaclav Kotesovec, Table of n, a(n) for n = 0..689 (terms 0..200 from Alois P. Heinz)
- Christopher Hunt Gribble, C++ program
Programs
-
Maple
b:= proc(n, i) option remember; `if`(n=0, [1, 0], `if`(i<1, [0$2], b(n, i-1)+`if`(i^2>n, [0$2], (g->g+[0, g[1]])(b(n-i^2, i))))) end: a:= n-> b(n^2, n)[2]: seq(a(n), n=0..40); # Alois P. Heinz, Sep 23 2013
-
Mathematica
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 *)