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.

User: Martin Wohlgemuth

Martin Wohlgemuth's wiki page.

Martin Wohlgemuth has authored 3 sequences.

A069466 Triangle T(n, k) of numbers of square lattice walks that start and end at origin after 2*n steps and contain exactly k steps to the east, possibly touching origin at intermediate stages.

Original entry on oeis.org

1, 2, 2, 6, 24, 6, 20, 180, 180, 20, 70, 1120, 2520, 1120, 70, 252, 6300, 25200, 25200, 6300, 252, 924, 33264, 207900, 369600, 207900, 33264, 924, 3432, 168168, 1513512, 4204200, 4204200, 1513512, 168168, 3432, 12870, 823680, 10090080, 40360320, 63063000, 40360320, 10090080, 823680, 12870
Offset: 0

Author

Martin Wohlgemuth, Mar 24 2002

Keywords

Comments

A Pólya plane walk takes steps (N,E,S,W) along cardinal directions in the plane, visiting only points of Z^2 (cf. Links). T(n,k) is the number of walks departing from and returning to the origin, with exactly 2*k steps along the NS axis and 2*(n-k) steps along the EW direction. Equivalently, triangle T(n,k) is the number of distinct permutations of a 2*n-letter word with letters (N,E,S,W) in multiplicity (k,n-k,k,n-k). Moving only along either NS or EW directions, T(n,0) = T(n,n) = A000894(n). Row sums appear as Equation 4 in the original Pólya article, Sum_{k=0..n} T(n,k) = A002894(n). This identity is proven routinely using Zeilberger's algorithm. - Bradley Klee, Aug 12 2018

Examples

			Triangle begins:
    1,
    2,    2,
    6,   24,     6,
   20,  180,   180,    20,
   70, 1120,  2520,  1120,   70,
  252, 6300, 25200, 25200, 6300, 252
  ...
T(4,2) = 2520 because there are 2520 distinct lattice walks of length 2*4=8 starting and ending at the origin and containing exactly 2 steps to the east.
For T(2,k), the lattice-path words are:
T(2,0):{EEWW, WEEW, WWEE, EWWE, WEWE, EWEW}
T(2,1):{NESW, NEWS, NSEW, NSWE, NWES, NWSE, ENSW, ENWS, ESNW, ESWN, EWNS, EWSN, SNEW, SNWE, SENW, SEWN, SWNE, SWEN, WNES, WNSE, WENS, WESN, WSNE, WSEN}
T(2,2):{NNSS, SNNS, SSNN, NSSN, SNSN, NSNS}
		

Crossrefs

T(2*n, n) = A008977(n).
Cf. A007318 (Pascal, m=1), this sequence (m=2), A320824 (m=3).

Programs

  • GAP
    T:=Flat(List([0..8],n->List([0..n],k->Binomial(2*n,n)*(Binomial(n,k))^2))); # Muniru A Asiru, Oct 21 2018
  • Maple
    T:=(n,k)->binomial(2*n,n)*(binomial(n,k))^2: seq(seq(T(n,k),k=0..n),n=0..8); # Muniru A Asiru, Oct 21 2018
  • Mathematica
    T[k_, r_] := Binomial[2k, k]*Binomial[k, r]^2; Table[T[k, r], {k, 0, 8}, {r, 0, k}] // Flatten (* Jean-François Alcover, Nov 21 2012, from explicit formula *)

Formula

Recurrences: T(1, 0) = T(1, 1)=2; T(k, r) = 2*k*(2*k-1)/(k-r)^2 * T(k-1, r); T(k, r) = (k+1-r)^2/r^2 * T(k, r-1).
T(n, k) = binomial(2*n, n) * binomial(n, k)^2.
Sum_{k=0..n} T(n, k) = A002894(n).
From Bradley Klee, Aug 12 2018: (Start)
T(n,k) = (2*n)!/((n-k)!*k!)^2.
T(n,k) = C(2*n,2*k)*C(2*(n-k),n-k)*C(2*k,k).
Sum_{k=0..n} T(n,k) = Sum_{k=0..n} C(2*n,2*k)*C(2*(n-k),n-k)*C(2*k,k) = C(2*n,n)^2.
Sum_{k=0..n} T(n,k) = Sum_{k=0..n} (2n)!/(k!(n-k)!)^2 = C(2*n,n)^2.
(End)

A068218 Triangle of numbers of square lattice walks that start and end at origin after 2k steps and contain exactly r steps to the east, not touching origin at intermediate stages.

Original entry on oeis.org

1, 2, 2, 2, 16, 2, 4, 84, 84, 4, 10, 400, 1056, 400, 10, 28, 1820, 9184, 9184, 1820, 28, 84, 8064, 66276, 126720, 66276, 8064, 84, 264, 35112, 426888, 1329768, 1329768, 426888, 35112, 264, 858, 151008, 2546544, 11737440, 19123776, 11737440
Offset: 0

Author

Martin Wohlgemuth, Mar 24 2002

Keywords

Comments

The given recurrences do not provide a means to calculate T(2r,r). But T(2r,r) is computable by the formula relating T(k,r) to A069466(k,r).

Examples

			T(3,1)=84 because there are 84 distinct lattice walks of length 2*3=6 starting and ending at the origin and containing exactly 1 step to the east and not touching origin at intermediate steps. Let E, W, S, N denote the 4 possible directions, then NNEWSS and NWSSNE are examples of such walks.
		

Crossrefs

T(k, 0) = A002420(k) = A069466(k)/(2k-1).
Cf. A054474 (row sums).

Programs

  • Mathematica
    A069466[k_, r_] := Binomial[2 k, k]*Binomial[k, r]^2; t[k_, r_] := t[k, r] = A069466[k, r] - Sum[Sum[t[i, j]*A069466[k - i, r - j], {j, 0, r}], {i, 1, k - 1}]; Table[t[k, r], {k, 0, 8}, {r, 0, k}] // Flatten (* Jean-François Alcover, Nov 21 2012, from formula *)

Formula

T(k, r) = 2*(2k-3)/(k-2r) * ( T(k-1, r) - T(k-1, r-1) ), for k > 2r. T(1, 0)=2, T(1, 1)=2 Sum[T(k, r), r=0, ..., k] = A054474(k) T(k, r)=A069466(k, r) - Sum[ Sum[ T(i, j)*A069466(k-i, r-j), j=0...r], i=1, k-1]

A072233 Square array T(n,k) read by antidiagonals giving number of ways to distribute n indistinguishable objects in k indistinguishable containers; containers may be left empty.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 2, 1, 1, 0, 1, 2, 2, 1, 1, 0, 1, 3, 3, 2, 1, 1, 0, 1, 3, 4, 3, 2, 1, 1, 0, 1, 4, 5, 5, 3, 2, 1, 1, 0, 1, 4, 7, 6, 5, 3, 2, 1, 1, 0, 1, 5, 8, 9, 7, 5, 3, 2, 1, 1, 0, 1, 5, 10, 11, 10, 7, 5, 3, 2, 1, 1, 0, 1, 6, 12, 15, 13, 11, 7, 5, 3, 2, 1, 1, 0, 1, 6, 14, 18, 18, 14, 11, 7, 5, 3, 2, 1, 1
Offset: 0

Author

Martin Wohlgemuth (mail(AT)matroid.com), Jul 05 2002

Keywords

Comments

Regarded as a triangular table, this is another version of the number of partitions of n into k parts, A008284. - Franklin T. Adams-Watters, Dec 18 2006
From Gus Wiseman, Feb 10 2021: (Start)
T(n,k) is also the number of partitions of n with greatest part k, if we assume the greatest part of an empty partition to be 0. Row n = 9 counts the following partitions:
111111111 22221 333 432 54 63 72 81 9
222111 3222 441 522 621 711
2211111 3321 4221 531 6111
21111111 32211 4311 5211
33111 42111 51111
321111 411111
3111111
(End)

Examples

			Table begins (upper left corner = T(0,0)):
1 1 1  1  1  1  1  1  1 ...
0 1 1  1  1  1  1  1  1 ...
0 1 2  2  2  2  2  2  2 ...
0 1 2  3  3  3  3  3  3 ...
0 1 3  4  5  5  5  5  5 ...
0 1 3  5  6  7  7  7  7 ...
0 1 4  7  9 10 11 11 11 ...
0 1 4  8 11 13 14 15 15 ...
0 1 5 10 15 18 20 21 22 ...
There is 1 way to distribute 0 objects into k containers: T(0, k) = 1. The different ways for n=4, k=3 are: (oooo)()(), (ooo)(o)(), (oo)(oo)(), (oo)(o)(o), so T(4, 3) = 4.
From _Wolfdieter Lang_, Dec 03 2012 (Start)
The triangle a(n,k) = T(n-k,k) begins:
n\k  0  1  2  3  4  5  6  7  8  9 10 ...
00   1
01   0  1
02   0  1  1
03   0  1  1  1
04   0  1  2  1  1
05   0  1  2  2  1  1
06   0  1  3  3  2  1  1
07   0  1  3  4  3  2  1  1
08   0  1  4  5  5  3  2  1  1
09   0  1  4  7  6  5  3  2  1  1
10   0  1  5  8  9  7  5  3  2  1  1
...
Row n=5 is, for k=1..5, [1,2,2,1,1] which gives the number of partitions of n=5 with k parts. See A008284 and the Franklin T. Adams-Watters comment above. (End)
From _Gus Wiseman_, Feb 10 2021: (Start)
Row n = 9 counts the following partitions:
  9  54  333  3222  22221  222111  2211111  21111111  111111111
     63  432  3321  32211  321111  3111111
     72  441  4221  33111  411111
     81  522  4311  42111
         531  5211  51111
         621  6111
         711
(End)
		

Crossrefs

Sum of antidiagonal entries T(n, k) with n+k=m equals A000041(m).
Alternating row sums are A081362.
Cf. A008284.
The version for factorizations is A316439.
The version for set partitions is A048993/A080510.
The version for strict partitions is A008289/A059607.
A047993 counts balanced partitions, ranked by A106529.
A063995/A105806 count partitions by Dyson rank.

Programs

  • Mathematica
    Flatten[Table[Length[IntegerPartitions[n, {k}]], {n, 0, 20}, {k, 0, n}]] (* Emanuele Munarini, Feb 24 2014 *)
  • Sage
    from sage.combinat.partition import number_of_partitions_length
    [[number_of_partitions_length(n, k) for k in (0..n)] for n in (0..10)] # Peter Luschny, Aug 01 2015

Formula

T(0, k) = 1, T(n, 0) = 0 (n>0), T(1, k) = 1 (k>0), T(n, 1) = 1 (n>0), T(n, k) = 0 for n < 0, T(n, k) = Sum[ T(n-k+i, k-i), i=0...k-1] Or, T(n, 1) = T(n, n) = 1, T(n, k) = 0 (k>n), T(n, k) = T(n-1, k-1) + T(n-k, k).
G.f. Product_{j=0..infinity} 1/(1-xy^j). Regarded as a triangular array, g.f. Product_{j=1..infinity} 1/(1-xy^j). - Franklin T. Adams-Watters, Dec 18 2006
O.g.f. of column No. k of the triangle a(n,k) is x^k/product(1-x^j,j=1..k), k>=0 (the undefined product for k=0 is put to 1). - Wolfdieter Lang, Dec 03 2012

Extensions

Corrected by Franklin T. Adams-Watters, Dec 18 2006