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.

A051288 Triangle read by rows: T(n,k) = number of paths of n upsteps U and n downsteps D that contain k UUDs.

Original entry on oeis.org

1, 2, 4, 2, 8, 12, 16, 48, 6, 32, 160, 60, 64, 480, 360, 20, 128, 1344, 1680, 280, 256, 3584, 6720, 2240, 70, 512, 9216, 24192, 13440, 1260, 1024, 23040, 80640, 67200, 12600, 252, 2048, 56320, 253440, 295680, 92400, 5544, 4096, 135168, 760320
Offset: 0

Views

Author

Keywords

Comments

By reading paths backward, the UUD in the name could be replaced by DDU.
Or, triangular array T read by rows: T(n,k)=P(2n,n,4k), where P(n,k,c)=number of vectors (x(1),x(2,),...,x(n)) of k 1's and n-k 0's such that x(i)=x(n+1-i) for exactly c values of i. P(n,k,n) counts palindromes.
In nuclear magnetic resonance of n coupled spin-1/2 nuclides, T(n,k) is the number of zero-quantum transitions with combination index k. See the [Sykora (2007)] link, containing also yet another interpretation in terms of pairs of binary n-tuples. - Stanislav Sykora, Apr 27 2012
Let u - (u_1, u_2, u_3, ..., u_{2n}) be a binary vector containing n 0's and n 1's. Define a mismatch to be an adjacent pair (u_{2i-1}, u_{2i}) which is neither 0,1 nor 1,0 (think "socks"). Then T(n,k) = number of u's with k mismatches. - N. J. A. Sloane, Nov 03 2017 following an email from Bill Gosper
From Colin Defant, Sep 16 2018: (Start)
Let s denote West's stack-sorting map. T(n,k) is the number of permutations pi of [n] with k valleys such that s(pi) avoids the patterns 132, 231, and 321. T(n,k) is also the number of permutations pi of [n] with k valleys such that s(pi) avoids the patterns 132, 312, and 321.
T(n,k) is the number of permutations of [n] with k valleys that avoid the patterns 1342, 3142, 3412, and 3421. (End)
T(n,k) is the number of card sequences for a balanced deck of 2n cards that end up with k pairs of cards in the black pile at the end of Stewart James' classic Miraskill card trick. See Table 2 in the [Tuenter (2024)] link. - Hans J. H. Tuenter, Dec 27 2024

Examples

			Table begins
n | k=0    1    2    3
--+-------------------
0 |   1
1 |   2
2 |   4    2
3 |   8   12
4 |  16   48    6
5 |  32  160   60
6 |  64  480  360   20
7 | 128 1344 1680  280
...
a(2,1)=2 because UUDD, DUUD each have one UUD.
		

Crossrefs

Row sums are the (even) central binomial coefficients A000984. A091894 gives the distribution of the parameter "number of DDUs" on Dyck paths.

Programs

  • Mathematica
    Table[Binomial[n, 2k]2^(n-2k)Binomial[2k, k], {n, 0, 15}, {k, 0, n/2}]

Formula

T(n, k) = binomial(n, 2*k)*2^(n-2*k)*binomial(2*k, k).
G.f.: (1-4*x+4*x^2*(1-y))^(-1/2) = Sum_{n>=0, k>=0} a(n, k)*x^n*y^k.

Extensions

Additional comments from David Callan, Aug 28 2004