login
A352523
Number of integer compositions of n with exactly k nonfixed points (parts not on the diagonal).
28
1, 1, 0, 0, 2, 0, 1, 1, 2, 0, 0, 4, 2, 2, 0, 0, 5, 5, 4, 2, 0, 1, 3, 12, 8, 6, 2, 0, 0, 7, 14, 19, 14, 8, 2, 0, 0, 8, 21, 33, 32, 22, 10, 2, 0, 0, 9, 30, 54, 63, 54, 32, 12, 2, 0, 1, 6, 47, 80, 116, 116, 86, 44, 14, 2, 0, 0, 11, 53, 129, 194, 229, 202, 130, 58, 16, 2, 0
OFFSET
0,5
COMMENTS
A nonfixed point in a composition c is an index i such that c_i != i.
LINKS
John Tyler Rascoe, Rows n = 0..130, flattened
FORMULA
G.f.: Sum_{i>=0} Product_{j=1..i} y*(x/(1-x) - x^j) + x^j. - John Tyler Rascoe, Mar 19 2025
EXAMPLE
Triangle begins:
1
1 0
0 2 0
1 1 2 0
0 4 2 2 0
0 5 5 4 2 0
1 3 12 8 6 2 0
0 7 14 19 14 8 2 0
0 8 21 33 32 22 10 2 0
0 9 30 54 63 54 32 12 2 0
1 6 47 80 116 116 86 44 14 2 0
...
For example, row n = 6 counts the following compositions (empty column indicated by dot):
(123) (6) (24) (231) (2112) (21111) .
(15) (33) (312) (2121) (111111)
(42) (51) (411) (3111)
(114) (1113) (11112)
(132) (1122) (11121)
(141) (1311) (11211)
(213) (2211)
(222) (12111)
(321)
(1131)
(1212)
(1221)
MAPLE
b:= proc(n, i) option remember; expand(`if`(n=0, 1,
add(`if`(i=j, 1, x)*b(n-j, i+1), j=1..n)))
end:
T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(b(n, 1)):
seq(T(n), n=0..12); # Alois P. Heinz, Mar 19 2025
MATHEMATICA
pnq[y_]:=Length[Select[Range[Length[y]], #!=y[[#]]&]];
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n], pnq[#]==k&]], {n, 0, 9}, {k, 0, n}]
PROG
(PARI)
T_xy(max_row) = {my(N=max_row+1, x='x+O('x^N), h= sum(i=0, N, prod(j=1, i, y*(x/(1-x)-x^j)+x^j))); vector(N, n, my(r=Vecrev(polcoeff(h, n-1))); if(n<2, r, concat(r, [0])))}
T_xy(10) \\ John Tyler Rascoe, Mar 21 2025
CROSSREFS
Column k = 0 is A010054.
Row sums are A011782.
The version for permutations is A098825.
The corresponding rank statistic is A352513.
Column k = 1 is A352520.
A238349 and A238350 count comps by fixed points, first col A238351, rank stat A352512.
A352486 gives the nonfixed points of A122111, counted by A330644.
A352521 counts comps by strong nonexcedances, first A219282, stat A352514.
A352522 counts comps by weak nonexcedances, first col A238874, stat A352515.
A352524 counts comps by strong excedances, first col A008930, stat A352516.
A352525 counts comps by weak excedances, first col A177510, stat A352517.
Sequence in context: A375537 A333307 A180793 * A116948 A101660 A276771
KEYWORD
nonn,tabl
AUTHOR
Gus Wiseman, Mar 26 2022
STATUS
approved