OFFSET
0,11
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..7000
FORMULA
a(n) = Sum_{k >= 0} (k^2)! * Q(n, k^2) where Q = A008289.
EXAMPLE
The a(10) = 25 matrices:
[10]
.
[4 3] [4 3] [4 2] [4 2] [4 1] [4 1] [3 4] [3 4]
[2 1] [1 2] [3 1] [1 3] [3 2] [2 3] [2 1] [1 2]
.
[3 2] [3 2] [3 1] [3 1] [2 4] [2 4] [2 3] [2 3]
[4 1] [1 4] [4 2] [2 4] [3 1] [1 3] [4 1] [1 4]
.
[2 1] [2 1] [1 4] [1 4] [1 3] [1 3] [1 2] [1 2]
[4 3] [3 4] [3 2] [2 3] [4 2] [2 4] [4 3] [3 4]
MAPLE
b:= proc(n, i) b(n, i):= `if`(n=0, [1], `if`(i<1, [], zip((x, y)
-> x+y, b(n, i-1), `if`(i>n, [], [0, b(n-i, i-1)[]]), 0)))
end:
a:= n-> (l-> add(l[i^2+1]*(i^2)!, i=0..floor(sqrt(nops(l)-1))))(b(n$2)):
seq(a(n), n=0..50); # Alois P. Heinz, Jan 17 2019
MATHEMATICA
Table[Sum[(k^2)!*Length[Select[IntegerPartitions[n, {k^2}], UnsameQ@@#&]], {k, n}], {n, 20}]
(* Second program: *)
q[n_, k_] := q[n, k] = If[n < k || k < 1, 0,
If[n == 1, 1, q[n-k, k] + q[n-k, k-1]]];
a[n_] := If[n == 0, 1, Sum[(k^2)! q[n, k^2], {k, 0, n}]];
a /@ Range[0, 50] (* Jean-François Alcover, May 20 2021 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jan 17 2019
STATUS
approved