login
Triangle read by rows: T(n,k) is the number of cyclic unimodal permutations of length n with a peak at position k.
2

%I #34 May 18 2018 20:41:51

%S 0,0,0,0,1,0,0,1,1,0,0,1,1,1,0,0,1,1,2,1,0,0,1,2,3,2,1,0,0,1,3,4,4,3,

%T 1,0,0,1,3,6,8,6,3,1,0,0,1,3,9,13,12,8,4,1,0,0,1,4,11,19,23,19,11,4,1,

%U 0,0,1,5,13,27,39,39,27,13,5,1,0

%N Triangle read by rows: T(n,k) is the number of cyclic unimodal permutations of length n with a peak at position k.

%F T(n,k) = Sum_{j=1..k-1} (-1)^(k+j+1)*A051168(n,j), when n is odd and n>2;

%F T(n,k) = Sum_{j=1..k-1} (-1)^(k+j+1)*A051168(n,j)+(-1)^(k+1)*Sum_{j<k, n-j==2 (mod 4)} A051168(n/2, j/2), when n is even and n>2.

%e For n = 5, there are 6 unimodal cyclic permutations: 234561, 235641, 246531, 345621, 465321. There are T(6,1) = 0 with peak at position 1, T(6,2) = 1 with peak at position 2, T(6,3) = 1 with peak at position 3, T(6,4) = 2 with peak at position 4, T(6,5) = 1 with peak at position 5, and T(6,6) = 0 with peak at position 6.

%e Starting at n=1 with 1 <= k <= n, the triangle begins:

%e 0,

%e 0, 0,

%e 0, 1, 0,

%e 0, 1, 1, 0,

%e 0, 1, 1, 1, 0,

%e 0, 1, 1, 2, 1, 0,

%e 0, 1, 2, 3, 2, 1, 0,

%o (PARI) t051168(n,k) = if (n==0, 1, (1/n) * sumdiv(gcd(n,k), d, moebius(d) * binomial(n/d,k/d)));

%o T(n, k) = my(t=sum(j=1, k-1, (-1)^(k+j+1)*t051168(n,j))); if (!(n % 2), t += (-1)^(k+1)*sum(j=1, k-1, if (((n-j) % 4) == 2, t051168(n/2, j/2)))); t;

%o tabl(nn) = for (n=1, nn, for (k=1, n, print1(T(n, k), ", ")); print); \\ _Michel Marcus_, May 16 2018

%Y Cf. A051168.

%K nonn,tabl

%O 1,19

%A _Kassie Archer_, May 03 2018