%I #52 May 15 2022 11:39:33
%S 1,0,1,1,1,0,2,1,1,0,3,4,1,0,0,6,7,3,0,0,0,11,16,4,1,0,0,0,22,29,12,1,
%T 0,0,0,0,42,60,23,3,0,0,0,0,0,82,120,47,7,0,0,0,0,0,0,161,238,100,12,
%U 1,0,0,0,0,0,0,316,479,198,30,1,0,0,0,0,0,0,0,624,956,404,61,3,0,0,0,0,0,0,0,0,1235,1910,818,126,7,0,0,0,0,0,0,0,0,0
%N Triangle T(n,k) read by rows: T(n,k) is the number of compositions of n with k parts p at position p (fixed points), n>=0, 0<=k<=n.
%C T(n*(n+3)/2,n) = A227682(n).
%C From _Vaclav Kotesovec_, Sep 07 2014: (Start)
%C In general, column k is asymptotic to c(k) * 2^n. The constants c(k) numerically:
%C c(0) = 0.144394047543301210639449860964615390044455952420342... = A048651/2
%C c(1) = 0.231997216225445223894202367545783700531838988546098... = c(0)*A065442
%C c(2) = 0.104261929557371534733906196116707679501974368826074...
%C c(3) = 0.017956317806894073430249112172514186063327165575720...
%C c(4) = 0.001343254222922697613125145839110293324517874530073...
%C c(5) = 0.000046459767012163920051487037952792359225887287888...
%C c(6) = 0.000000768651747857094917953943327540619110335556499...
%C c(7) = 0.000000006200599904985793344094393321042983316604040...
%C c(8) = 0.000000000024656652167851516076173236693314090168122...
%C c(9) = 0.000000000000048633746319332356416193899916110113745...
%C c(10)= 0.000000000000000047750743608910618576944191079881479...
%C c(20)= 1.05217230403079700467566...*10^(-63)
%C For big k is c(k) ~ m * 2^(-k*(k+1)/2), where m = 1/(4*c(0)) = 1/(2*A048651) = 1.7313733097275318...
%C (End)
%D M. Archibald, A. Blecher and A. Knopfmacher, Fixed points in compositions and words, accepted by the Journal of Integer Sequences.
%H Joerg Arndt and Alois P. Heinz, <a href="/A238349/b238349.txt">Table of n, a(n) for n = 0..10010</a> (rows 0..140, flattened)
%H M. Archibald, A. Blecher, and A. Knopfmacher, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL23/Blecher/arch14.html">Fixed Points in Compositions and Words</a>, J. Int. Seq., Vol. 23 (2020), Article 20.11.1.
%e Triangle starts:
%e 00: 1,
%e 01: 0, 1,
%e 02: 1, 1, 0,
%e 03: 2, 1, 1, 0,
%e 04: 3, 4, 1, 0, 0,
%e 05: 6, 7, 3, 0, 0, 0,
%e 06: 11, 16, 4, 1, 0, 0, 0,
%e 07: 22, 29, 12, 1, 0, 0, 0, 0,
%e 08: 42, 60, 23, 3, 0, 0, 0, 0, 0,
%e 09: 82, 120, 47, 7, 0, 0, 0, 0, 0, 0,
%e 10: 161, 238, 100, 12, 1, 0, 0, 0, 0, 0, 0,
%e 11: 316, 479, 198, 30, 1, 0, 0, 0, 0, 0, 0, 0,
%e 12: 624, 956, 404, 61, 3, 0, 0, 0, 0, 0, 0, 0, 0,
%e 13: 1235, 1910, 818, 126, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0,
%e 14: 2449, 3817, 1652, 258, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
%e 15: 4864, 7633, 3319, 537, 30, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
%e ...
%e From _Gus Wiseman_, Apr 03 2022: (Start)
%e Row n = 5 counts the following compositions (empty columns indicated by dots):
%e (5) (14) (113) . . .
%e (23) (32) (122)
%e (41) (131) (1211)
%e (212) (221)
%e (311) (1112)
%e (2111) (1121)
%e (11111)
%e (End)
%p b:= proc(n, i) option remember; `if`(n=0, 1, expand(
%p add(b(n-j, i+1)*`if`(i=j, x, 1), j=1..n)))
%p end:
%p T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(b(n, 1)):
%p seq(T(n), n=0..15);
%t b[n_, i_] := b[n, i] = If[n == 0, 1, Expand[Sum[b[n-j, i+1]*If[i == j, x, 1], {j, 1, n}]]]; T[n_] := Function[{p}, Table[Coefficient[p, x, i], {i, 0, n}]][b[n, 1]]; Table[T[n], {n, 0, 15}] // Flatten (* _Jean-François Alcover_, Jan 06 2015, after _Alois P. Heinz_ *)
%t pq[y_]:=Length[Select[Range[Length[y]],#==y[[#]]&]];
%t Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],pq[#]==k&]],{n,0,9},{k,0,n}] (* _Gus Wiseman_, Apr 03 2022 *)
%Y Row sums are A011782.
%Y Columns k=0-10 give: A238351, A240736, A240737, A240738, A240739, A240740, A240741, A240742, A240743, A240744, A240745.
%Y The version for permutations is A008290.
%Y The version with all zeros removed is A238350.
%Y The version for reversed partitions is A238352.
%Y The corresponding rank statistic is A352512, nonfixed A352513.
%Y The version for nonfixed points is A352523, A352520 (k=1).
%Y Below: comps = compositions, first = column k=0, stat = rank statistic.
%Y - A352521 counts comps by strong nonexcedances, first A219282, stat A352514.
%Y - A352522 counts comps by weak nonexcedances, first A238874, stat A352515.
%Y - A352524 counts comps by strong excedances, first A008930, stat A352516.
%Y - A352525 counts comps by weak excedances, A177510 (k=1), stat A352517.
%Y Cf. A008292, A088218, A098825, A227682, A352487.
%K nonn,tabl
%O 0,7
%A _Joerg Arndt_ and _Alois P. Heinz_, Feb 25 2014