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.

Showing 1-2 of 2 results.

A334218 Triangle read by rows: T(n,k) is the number of permutations of 1..n arranged in a circle with exactly k descents.

Original entry on oeis.org

1, 1, 0, 0, 2, 0, 0, 3, 3, 0, 0, 4, 16, 4, 0, 0, 5, 55, 55, 5, 0, 0, 6, 156, 396, 156, 6, 0, 0, 7, 399, 2114, 2114, 399, 7, 0, 0, 8, 960, 9528, 19328, 9528, 960, 8, 0, 0, 9, 2223, 38637, 140571, 140571, 38637, 2223, 9, 0, 0, 10, 5020, 146080, 882340, 1561900, 882340, 146080, 5020, 10, 0
Offset: 0

Views

Author

Andrew Howroyd, May 04 2020

Keywords

Examples

			Triangle begins:
  1;
  1, 0;
  0, 2,   0;
  0, 3,   3,    0;
  0, 4,  16,    4,     0;
  0, 5,  55,   55,     5,    0;
  0, 6, 156,  396,   156,    6,   0;
  0, 7, 399, 2114,  2114,  399,   7, 0;
  0, 8, 960, 9528, 19328, 9528, 960, 8, 0;
  ...
		

Crossrefs

Columns k=2..9 are A027540(n-1), A151576, A151577, A151578, A151579, A151580, A151581, A151582.
Row sums are A000142.
Cf. A008292.

Programs

  • PARI
    T(n, k) = {if(n==0, k==0, n*sum(j=0, k, (-1)^j * (k-j)^(n-1) * binomial(n, j)))}

Formula

T(n, k) = n*A008292(n-1, k) for n > 1.
T(n, k) = T(n, n-k) for n > 1.
T(n, k) = n*Sum_{j=0..k} (-1)^j * (k-j)^(n-1) * binomial(n, j) for n > 0.

A151583 Number of permutations of 2 indistinguishable copies of 1..n arranged in a circle with exactly 2 adjacent element pairs in decreasing order.

Original entry on oeis.org

0, 2, 45, 260, 1115, 4230, 15113, 52232, 176823, 590090, 1948133, 6376716, 20725523, 66960782, 215232705, 688746512, 2195381615, 6973567506, 22082966429, 69735686420, 219667415499, 690383309462, 2165293110905, 6778308873240, 21182215233575, 66088511533850
Offset: 1

Views

Author

R. H. Hardin, May 21 2009

Keywords

Crossrefs

With 3..8 descents: A151584, A151585, A151586, A151587, A151588, A151589.
With 3..7 copies of 1..n: A151590, A151597, A151603, A151607, A151610.

Programs

  • PARI
    a(n) = if(n <= 1, 0, n*(3^n - 4*n)) \\ Andrew Howroyd, May 04 2020
    
  • PARI
    concat(0, Vec(x^2*(2 + 27*x - 85*x^2 + 33*x^3 - 9*x^4) / ((1 - x)^3*(1 - 3*x)^2) + O(x^30))) \\ Colin Barker, Jul 15 2020

Formula

a(n) = n*(3^n - 4*n) for n > 1. - Andrew Howroyd, May 04 2020
From Colin Barker, Jul 15 2020: (Start)
G.f.: x^2*(2 + 27*x - 85*x^2 + 33*x^3 - 9*x^4) / ((1 - x)^3*(1 - 3*x)^2).
a(n) = 9*a(n-1) - 30*a(n-2) + 46*a(n-3) - 33*a(n-4) + 9*a(n-5) for n>6.
(End)

Extensions

Terms a(13) and beyond from Andrew Howroyd, May 04 2020
Showing 1-2 of 2 results.