login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A245692 Number T(n,k) of endofunctions f on [n] that are self-inverse on [k] but not on [k+1]; triangle T(n,k), n>=0, 0<=k<=n, read by rows. 4
1, 0, 1, 1, 1, 2, 12, 7, 4, 4, 144, 62, 28, 12, 10, 2000, 695, 264, 100, 40, 26, 32400, 9504, 3126, 1050, 370, 130, 76, 605052, 154007, 44716, 13458, 4256, 1366, 456, 232, 12845056, 2891776, 751872, 204776, 58784, 17292, 5272, 1624, 764 (list; table; graph; refs; listen; history; text; internal format)
OFFSET
0,6
COMMENTS
T(n,k) counts endofunctions f:{1,...,n}-> {1,...,n} with f(f(i))=i for all i in {1,...,k} and f(f(k+1))<>k+1 if k<n.
LINKS
FORMULA
T(n,k) = A245348(n,k) - A245348(n,k+1).
EXAMPLE
T(3,1) = 7: (1,1,1), (1,1,2), (1,1,3), (1,3,1), (1,3,3), (3,1,1), (3,3,1).
T(3,2) = 4: (1,2,1), (1,2,2), (2,1,1), (2,1,2).
T(3,3) = 4: (1,2,3), (1,3,2), (2,1,3), (3,2,1).
Triangle T(n,k) begins:
0 : 1;
1 : 0, 1;
2 : 1, 1, 2;
3 : 12, 7, 4, 4;
4 : 144, 62, 28, 12, 10;
5 : 2000, 695, 264, 100, 40, 26;
6 : 32400, 9504, 3126, 1050, 370, 130, 76;
7 : 605052, 154007, 44716, 13458, 4256, 1366, 456, 232;
...
MAPLE
g:= proc(n) g(n):= `if`(n<2, 1, g(n-1)+(n-1)*g(n-2)) end:
H:= (n, k)-> add(binomial(n-k, i)*binomial(k, i)*i!*
g(k-i)*n^(n-k-i), i=0..min(k, n-k)):
T:= (n, k)-> H(n, k) -H(n, k+1):
seq(seq(T(n, k), k=0..n), n=0..10);
MATHEMATICA
g[n_] := g[n] = If[n<2, 1, g[n-1] + (n-1)*g[n-2]]; H[0, 0] = 1; H[n_, k_] := Sum[Binomial[n-k, i]*Binomial[k, i]*i!*g[k-i]*n^(n-k-i), {i, 0, Min[k, n-k]}]; T[n_, k_] := H[n, k] - H[n, k+1]; Table[T[n, k], {n, 0, 10}, { k, 0, n}] // Flatten (* Jean-François Alcover, Feb 19 2017, translated from Maple *)
CROSSREFS
Column k=0 gives A076728 for n>1.
Row sums give A000312.
Main diagonal gives A000085.
Cf. A245348, A245693 (the same for permutations).
Sequence in context: A354484 A107414 A133437 * A182126 A334143 A306699
KEYWORD
nonn,tabl
AUTHOR
Alois P. Heinz, Jul 29 2014
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 6 21:30 EDT 2024. Contains 372297 sequences. (Running on oeis4.)