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-4 of 4 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.

A151576 Number of permutations of 1..n arranged in a circle with exactly 3 adjacent element pairs in decreasing order.

Original entry on oeis.org

0, 4, 55, 396, 2114, 9528, 38637, 146080, 526240, 1831644, 6217523, 20716164, 68059710, 221195824, 712856665, 2282058360, 7266358556, 23035517940, 72760054815, 229112753980, 719545590010, 2254604460264, 7050252659525, 22006821057936, 68581455012504, 213411502891468
Offset: 3

Views

Author

R. H. Hardin, May 21 2009

Keywords

Comments

Exactly 2 adjacent element pairs in decreasing order gives A027540(n-1).

Crossrefs

Column k=3 of A334218.
Related sequences: A151577-A151610.
Cf. A000460.

Programs

  • PARI
    a(n)={n*(3^(n-1) - n*2^(n-1) + n*(n-1)/2)} \\ Andrew Howroyd, May 05 2020

Formula

From Andrew Howroyd, May 05 2020: (Start)
a(n) = n*A000460(n-1).
a(n) = n*(3^(n-1) - n*2^(n-1) + n*(n-1)/2).
a(n) = 16*a(n-1) - 111*a(n-2) + 438*a(n-3) - 1083*a(n-4) + 1740*a(n-5) - 1817*a(n-6) + 1190*a(n-7) - 444*a(n-8) + 72*a(n-9).
G.f.: x^4*(4 - 9*x - 40*x^2 + 131*x^3 - 98*x^4)/((1 - x)^4*(1 - 2*x)^3*(1 - 3*x)^2).
(End)

Extensions

Terms a(18) and beyond from Andrew Howroyd, May 05 2020

A126136 Binomial transform of A107430.

Original entry on oeis.org

1, 2, 1, 4, 3, 2, 8, 7, 9, 3, 16, 15, 28, 16, 6, 32, 31, 75, 55, 40, 10, 64, 63, 186, 156, 165, 75, 20, 128, 127, 441, 399, 546, 336, 175, 35, 256, 255, 1016, 960, 1596, 1176, 896, 336, 70, 512, 511, 2295, 2223, 4320, 3564, 3528, 1848, 756, 126, 1024, 1023, 5110, 5020, 11115, 9855, 11880, 7680, 4620, 1470, 252
Offset: 0

Views

Author

Gary W. Adamson, Dec 18 2006

Keywords

Comments

Row sums = powers of 3.

Examples

			First few rows of the triangle are:
1;
2, 1;
4, 3, 2;
8, 7, 9, 3;
16, 15, 28, 16, 6;
32, 31, 75, 55, 40, 10;
...
		

Crossrefs

Programs

  • PARI
    tabl(nn) = {p = matrix(nn+1, nn+1, n, k, binomial(n-1, k-1)); m = matrix(nn+1, nn+1, n, k, if (k<=n, binomial(n-1, (k-1)\2), 0)); r = p*m; for (n=0, nn, for (k=0, n, print1(r[n+1,k+1], ", ");); print(););} \\ Michel Marcus, Jul 03 2017

Formula

Given M = A107430 as an infinite lower triangular matrix and P = Pascal's triangle, A126136 = P*M.

Extensions

More terms from Philippe Deléham, Jul 02 2017

A164238 Number of binary strings of length n with equal numbers of 00100 and 01101 substrings.

Original entry on oeis.org

1, 2, 4, 8, 16, 30, 56, 104, 194, 363, 682, 1286, 2432, 4612, 8766, 16701, 31887, 61017, 117001, 224812, 432789, 834689, 1612548, 3120361, 6047274, 11736581, 22809338, 44385205, 86473743, 168662839, 329316660, 643634073, 1259124723, 2465346235
Offset: 0

Views

Author

R. H. Hardin Aug 11 2009

Keywords

Comments

Exactly 2 adjacent element pairs in decreasing order gives A027540
Showing 1-4 of 4 results.