Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #18 Mar 30 2024 23:08:37
%S 2,5,11,3,4,23,10,17,47,367,173,121,6,95,1431,3973,2513,331,191,567,
%T 1395,8011,391,761,8,383,8615,139897,78483,27201,21685,113,767,28073,
%U 715277,1298393,158189,1310499,40613,4049,10,1535,89311,1721203,9555617,37414903,27455053,7254087,582767,4549
%N Irregular triangle of numerators of the average value of the first letter over all derangements of {1, 2, ..., n} with k descents.
%C Even-indexed rows have length n - 1; odd-indexed rows have length n - 2.
%C Conjecture: T(n, 1) = A083329(n - 1).
%C T(2n, 2n-1) = 2n, since the only derangement of 2n letters with 2n-1 descents is [2n, 2n-1,...,3,2,1].
%C The analogous sequence for permutations is T'(n, k) = k + 1.
%e Triangle begins:
%e 2;
%e 5;
%e 11, 3, 4;
%e 23, 10, 17;
%e 47, 367, 173, 121, 6;
%e 95, 1431, 3973, 2513, 331;
%e 191, 567, 1395, 8011, 391, 761, 8.
%e T(4,1) = 11 because the derangements of four letters with one descent are
%e [2,3,4,1], [2,4,1,3], [3,4,1,2], and [4,1,2,3], and the expected value of the first letter is (2+2+3+4)/4 = 11/4, which has 11 as its numerator.
%o (PARI)
%o descents(p)={sum(i=2, #p, p[i]<p[i-1])}
%o isderange(p)={for(i=1, #p, if(p[i]==i, return(0))); 1}
%o qrow(n, f=numerator)={my(s=vector(n-n%2-1), d=vector(#s)); forperm(n, p, if(isderange(p), my(k=descents(p)); d[k]++; s[k]+=p[1])); vector(#s, k, f(s[k]/d[k]))}
%o { for(n=2, 8, print(qrow(n, numerator))) } \\ _Andrew Howroyd_, Feb 02 2022
%Y Cf. A000166, A083329, A219836.
%Y Denominators are given by A332010.
%K nonn,tabf
%O 2,1
%A _Peter Kagey_, Feb 04 2020
%E Terms a(27) and beyond from _Andrew Howroyd_, Feb 02 2022