# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/
Search: id:a369596
Showing 1-1 of 1
%I A369596 #58 May 24 2024 11:59:35
%S A369596 1,0,1,1,0,0,1,2,1,1,1,0,0,1,9,2,2,3,3,2,1,1,0,0,1,44,9,9,11,11,13,5,
%T A369596 5,4,4,2,1,1,0,0,1,265,44,44,53,53,62,64,29,22,24,16,16,8,6,5,4,2,1,1,
%U A369596 0,0,1,1854,265,265,309,309,353,362,406,150,159,126,126,93,86,44,36,29,19,19,9,7,5,4,2,1,1,0,0,1
%N A369596 Number T(n,k) of permutations of [n] whose fixed points sum to k; triangle T(n,k), n>=0, 0<=k<=A000217(n), read by rows.
%H A369596 Alois P. Heinz, Rows n = 0..50, flattened
%H A369596 Wikipedia, Permutation
%F A369596 Sum_{k=0..A000217(n)} k * T(n,k) = A001710(n+1) for n >= 1.
%F A369596 Sum_{k=0..A000217(n)} (1+k) * T(n,k) = A038720(n) for n >= 1.
%F A369596 Sum_{k=0..A000217(n)} (n*(n+1)/2-k) * T(n,k) = A317527(n+1).
%F A369596 T(n,A161680(n)) = A331518(n).
%F A369596 T(n,A000217(n)) = 1.
%e A369596 T(3,0) = 2: 231, 312.
%e A369596 T(3,1) = 1: 132.
%e A369596 T(3,2) = 1: 321.
%e A369596 T(3,3) = 1: 213.
%e A369596 T(3,6) = 1: 123.
%e A369596 T(4,0) = 9: 2143, 2341, 2413, 3142, 3412, 3421, 4123, 4312, 4321.
%e A369596 Triangle T(n,k) begins:
%e A369596 1;
%e A369596 0, 1;
%e A369596 1, 0, 0, 1;
%e A369596 2, 1, 1, 1, 0, 0, 1;
%e A369596 9, 2, 2, 3, 3, 2, 1, 1, 0, 0, 1;
%e A369596 44, 9, 9, 11, 11, 13, 5, 5, 4, 4, 2, 1, 1, 0, 0, 1;
%e A369596 ...
%p A369596 b:= proc(s) option remember; (n-> `if`(n=0, 1, add(expand(
%p A369596 `if`(j=n, x^j, 1)*b(s minus {j})), j=s)))(nops(s))
%p A369596 end:
%p A369596 T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b({$1..n})):
%p A369596 seq(T(n), n=0..7);
%p A369596 # second Maple program:
%p A369596 g:= proc(n) option remember; `if`(n=0, 1, n*g(n-1)+(-1)^n) end:
%p A369596 b:= proc(n, i, m) option remember; `if`(n>i*(i+1)/2, 0,
%p A369596 `if`(n=0, g(m), b(n, i-1, m)+b(n-i, min(n-i, i-1), m-1)))
%p A369596 end:
%p A369596 T:= (n, k)-> b(k, min(n, k), n):
%p A369596 seq(seq(T(n, k), k=0..n*(n+1)/2), n=0..7);
%t A369596 g[n_] := g[n] = If[n == 0, 1, n*g[n - 1] + (-1)^n];
%t A369596 b[n_, i_, m_] := b[n, i, m] = If[n > i*(i + 1)/2, 0,
%t A369596 If[n == 0, g[m], b[n, i-1, m] + b[n-i, Min[n-i, i-1], m-1]]];
%t A369596 T[n_, k_] := b[k, Min[n, k], n];
%t A369596 Table[Table[T[n, k], {k, 0, n*(n + 1)/2}], {n, 0, 7}] // Flatten (* _Jean-François Alcover_, May 24 2024, after _Alois P. Heinz_ *)
%Y A369596 Column k=0 gives A000166.
%Y A369596 Column k=3 gives A000255(n-2) for n>=2.
%Y A369596 Row sums give A000142.
%Y A369596 Row lengths give A000124.
%Y A369596 Reversed rows converge to A331518.
%Y A369596 T(n,n) gives A369796.
%Y A369596 Cf. A000217, A001710, A008289, A008290, A038720, A053632, A062869, A124327, A143946, A143947, A161680, A263753, A263756, A317527, A367955, A368338.
%K A369596 nonn,tabf
%O A369596 0,8
%A A369596 _Alois P. Heinz_, Mar 02 2024
# Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE