login
Number of permutations p of [n] such that p(i) > p(i+1) iff i == 0 (mod 7).
3

%I #14 Aug 01 2023 12:10:32

%S 1,1,1,1,1,1,1,1,7,35,119,329,791,1715,3431,45031,400281,2313633,

%T 10467037,39845281,132908041,398840401,7677528495,98103087719,

%U 800524248391,5030038213949,26202586666879,117991927960739,472105349529479,11979440405949527

%N Number of permutations p of [n] such that p(i) > p(i+1) iff i == 0 (mod 7).

%H Alois P. Heinz, <a href="/A250284/b250284.txt">Table of n, a(n) for n = 0..500</a>

%e a(7) = 1: 1234567.

%e a(8) = 7: 12345687, 12345786, 12346785, 12356784, 12456783, 13456782, 23456781.

%p b:= proc(u, o, t) option remember; `if`(u+o=0, 1,

%p `if`(t=0, add(b(u-j, o+j-1, irem(t+1, 7)), j=1..u),

%p add(b(u+j-1, o-j, irem(t+1, 7)), j=1..o)))

%p end:

%p a:= n-> b(n, 0$2):

%p seq(a(n), n=0..35);

%t nmax = 30; CoefficientList[Series[1 + Sum[(x^(7 - k) * HypergeometricPFQ[{1}, {8/7 - k/7, 9/7 - k/7, 10/7 - k/7, 11/7 - k/7, 12/7 - k/7, 13/7 - k/7, 2 - k/7}, -x^7/823543])/(7 - k)!, {k, 0, 6}] / HypergeometricPFQ[{}, {1/7, 2/7, 3/7, 4/7, 5/7, 6/7}, -x^7/823543], {x, 0, nmax}], x] * Range[0, nmax]! (* _Vaclav Kotesovec_, Apr 21 2021 *)

%Y Row n=7 of A181937.

%K nonn

%O 0,9

%A _Alois P. Heinz_, Nov 16 2014