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.

Original entry on oeis.org

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, 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, 0, 0, 1, 5, 13, 27, 39, 39, 27, 13, 5, 1, 0
Offset: 1

Views

Author

Kassie Archer, May 03 2018

Keywords

Examples

			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.
Starting at n=1 with 1 <= k <= n, the triangle begins:
  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,
		

Crossrefs

Cf. A051168.

Programs

  • PARI
    t051168(n,k) = if (n==0, 1, (1/n) * sumdiv(gcd(n,k), d, moebius(d) * binomial(n/d,k/d)));
    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;
    tabl(nn) = for (n=1, nn, for (k=1, n, print1(T(n, k), ", ")); print); \\ Michel Marcus, May 16 2018

Formula

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