login
A344708
Number of partitions of n^2 into a square number of square parts.
1
1, 1, 2, 2, 3, 5, 10, 16, 30, 65, 126, 248, 527, 1024, 2061, 4310, 8213, 16367, 33041, 63217, 122919, 242242, 458198, 877519, 1685444, 3159685, 5944954, 11204470, 20745676, 38471990, 71245358, 130408025, 238462989, 435146790, 787184098, 1421400530, 2559536132
OFFSET
0,3
LINKS
EXAMPLE
a(5) = 5: [25], [16,4,4,1], [9,9,1,1,1,1,1,1,1], [4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1], [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1].
MAPLE
s:= n-> issqr(n):
h:= proc(n) option remember; `if`(s(n), n, h(n-1)) end:
b:= proc(n, i, c) option remember; `if`(n=0 or i=1, `if`(
s(c+n), 1, 0), b(n-i, h(min(n-i, i)), c+1)+b(n, h(i-1), c))
end:
a:= n-> b(n^2$2, 0):
seq(a(n), n=0..40);
MATHEMATICA
s[n_] := IntegerQ@Sqrt[n];
h[n_] := h[n] = If[s[n], n, h[n - 1]];
b[n_, i_, c_] := b[n, i, c] = If[n == 0 || i == 1, If[s[c + n], 1, 0],
b[n - i, h[Min[n - i, i]], c + 1] + b[n, h[i - 1], c]];
a[n_] := b[n^2, n^2, 0];
Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Jun 25 2022, after Alois P. Heinz *)
CROSSREFS
Cf. A000290.
Sequence in context: A130377 A260956 A360299 * A322113 A153900 A049873
KEYWORD
nonn
AUTHOR
Alois P. Heinz, May 26 2021
STATUS
approved