cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

This page as a plain text file.
%I A303979 #34 May 18 2018 20:41:51
%S A303979 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 A303979 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 A303979 0,0,1,5,13,27,39,39,27,13,5,1,0
%N A303979 Triangle read by rows: T(n,k) is the number of cyclic unimodal permutations of length n with a peak at position k.
%F A303979 T(n,k) = Sum_{j=1..k-1} (-1)^(k+j+1)*A051168(n,j), when n is odd and n>2;
%F A303979 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 A303979 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 A303979 Starting at n=1 with 1 <= k <= n, the triangle begins:
%e A303979   0,
%e A303979   0, 0,
%e A303979   0, 1, 0,
%e A303979   0, 1, 1, 0,
%e A303979   0, 1, 1, 1, 0,
%e A303979   0, 1, 1, 2, 1, 0,
%e A303979   0, 1, 2, 3, 2, 1, 0,
%o A303979 (PARI) t051168(n,k) = if (n==0, 1, (1/n) * sumdiv(gcd(n,k), d, moebius(d) * binomial(n/d,k/d)));
%o A303979 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 A303979 tabl(nn) = for (n=1, nn, for (k=1, n, print1(T(n, k), ", ")); print); \\ _Michel Marcus_, May 16 2018
%Y A303979 Cf. A051168.
%K A303979 nonn,tabl
%O A303979 1,19
%A A303979 _Kassie Archer_, May 03 2018