OFFSET
0,9
COMMENTS
Number of endofunctions f on [n] such that an endofunction g on [n] exists with f=g^k.
EXAMPLE
A(3,2) = 12: (1,1,1), (1,1,3), (1,2,1), (1,2,2), (1,2,3), (1,3,3), (2,2,2), (2,2,3), (2,3,1), (3,1,2), (3,2,3), (3,3,3).
A(3,6) = 10: (1,1,1), (1,1,3), (1,2,1), (1,2,2), (1,2,3), (1,3,3), (2,2,2), (2,2,3), (3,2,3), (3,3,3).
A(4,4) = 73: (1,1,1,1), (1,1,1,4), (1,1,3,1), (1,1,3,3), ..., (4,4,1,3), (4,4,2,3), (4,4,3,4), (4,4,4,4).
Square array A(n,k) begins:
1, 1, 1, 1, 1, 1, 1, 1, ...
1, 1, 1, 1, 1, 1, 1, 1, ...
1, 4, 3, 4, 3, 4, 3, 4, ...
1, 27, 12, 19, 12, 21, 10, 21, ...
1, 256, 100, 116, 73, 148, 44, 148, ...
1, 3125, 1075, 985, 580, 1281, 295, 1305, ...
1, 46656, 13356, 11026, 5721, 12942, 3136, 13806, ...
1, 823543, 197764, 145621, 69244, 150955, 42784, 169681, ...
MATHEMATICA
(* This program is not suitable to compute a large number of terms. *)
nmax = 8;
f[a_][b_] /; Length[a]==Length[b] := Table[b[[a[[i]]]], {i, 1, Length[a]}];
A[n_, k_] := Nest[f[#], Range[n], k]& /@ Tuples[Range[n], {n}] // Union // Length;
Table[A[n-k, k], {n, 0, nmax}, {k, n, 0, -1}] // Flatten (* Jean-François Alcover, May 05 2019 *)
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Alois P. Heinz, Sep 09 2014
STATUS
approved