A332716 Number of compositions of n^2 where each part is less than or equal to n.
1, 1, 5, 149, 20569, 11749641, 26649774581, 236837126431501, 8237168505776637425, 1125036467745713090813969, 606147434557459526483161067501, 1293596348252277644272081532560154645, 10970544241076481629439275072320816659677161
Offset: 0
Keywords
Examples
a(2) = 5: 22, 211, 121, 112, 1111.
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..57
Programs
-
Maple
b:= proc(n, k) option remember; `if`(n=0, 1, add(b(n-d, k), d=1..min(n, k))) end: a:= n-> b(n^2, n): seq(a(n), n=0..15);
-
Mathematica
b[n_, k_] := b[n, k] = If[n == 0, 1, Sum[b[n - d, k], {d, 1, Min[n, k]}]]; a[n_] := b[n^2, n]; Table[a[n], {n, 0, 15}] (* Jean-François Alcover, Oct 31 2022, after Alois P. Heinz *)
Formula
a(n) = Sum_{i=0..n-1} A048004(n^2-1,i) for i > 0.
Comments