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-3 of 3 results.

A026009 Triangular array T read by rows: T(n,0) = 1 for n >= 0; T(1,1) = 1; and for n >= 2, T(n,k) = T(n-1,k-1) + T(n-1,k) for k = 1,2,...,[(n+1)/2]; T(n,n/2 + 1) = T(n-1,n/2) if n is even.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 3, 3, 1, 4, 6, 3, 1, 5, 10, 9, 1, 6, 15, 19, 9, 1, 7, 21, 34, 28, 1, 8, 28, 55, 62, 28, 1, 9, 36, 83, 117, 90, 1, 10, 45, 119, 200, 207, 90, 1, 11, 55, 164, 319, 407, 297, 1, 12, 66, 219, 483, 726, 704, 297, 1, 13, 78, 285, 702, 1209, 1430, 1001, 1, 14, 91, 363, 987, 1911, 2639, 2431, 1001
Offset: 0

Views

Author

Keywords

Examples

			From _Jonathon Kirkpatrick_, Jul 01 2016: (Start)
Triangle begins:
  1;
  1,  1;
  1,  2,  1;
  1,  3,  3;
  1,  4,  6,   3;
  1,  5, 10,   9;
  1,  6, 15,  19,   9;
  1,  7, 21,  34,  28;
  1,  8, 28,  55,  62,   28;
  1,  9, 36,  83, 117,   90;
  1, 10, 45, 119, 200,  207,   90;
  1, 11, 55, 164, 319,  407,  297;
  1, 12, 66, 219, 483,  726,  704,  297;
  1, 13, 78, 285, 702, 1209, 1430, 1001;
  ... (End)
		

Crossrefs

Sums involving this sequence: A026010, A027287, A027288, A027289, A027290, A027291, A027292.

Programs

  • Magma
    [1] cat [Binomial(n,k) - Binomial(n,k-3): k in [0..Floor((n+2)/2)], n in [1..15]]; // G. C. Greubel, Mar 18 2021
  • Mathematica
    T[n_, k_]:= Binomial[n, k] - Binomial[n, k-3];
    Join[{1}, Table[T[n, k], {n,14}, {k,0,Floor[(n+2)/2]}]//Flatten] (* G. C. Greubel, Mar 18 2021 *)
  • Sage
    [1]+flatten([[binomial(n,k) - binomial(n,k-3) for k in (0..(n+2)//2)] for n in (1..15)]) # G. C. Greubel, Mar 18 2021
    

Formula

T(n, k) = binomial(n, k) - binomial(n, k-3). - Darko Marinov (marinov(AT)lcs.mit.edu), May 17 2001
Sum_{k=0..floor((n+2)/2)} T(n, k) = A026010(n). - G. C. Greubel, Mar 18 2021

A375085 Triangle read by rows: T(n,k) is the number of ballotlike paths ending at (n, k), with 0 <= k <= n.

Original entry on oeis.org

0, 0, 1, 1, 1, 1, 2, 3, 2, 1, 5, 9, 6, 3, 1, 14, 28, 21, 10, 4, 1, 42, 90, 76, 39, 15, 5, 1, 132, 297, 276, 159, 64, 21, 6, 1, 429, 1001, 1002, 643, 288, 97, 28, 7, 1, 1430, 3432, 3641, 2555, 1281, 475, 139, 36, 8, 1, 4862, 11934, 13261, 10004, 5536, 2300, 733, 191, 45, 9, 1
Offset: 0

Views

Author

Stefano Spezia, Jul 29 2024

Keywords

Comments

A ballotlike path is a lattice path in the 1st quadrant starting at (0, 0) and ending at (n, k) which uses the steps U = (1, 1), D = (1, -1), u = (1, 0) (for upstairs or umber) and d = (1, 0) (for downstairs or denim), subject to the conditions that the umber horizontal steps do not occur at height zero and the denim horizontal steps do not occur before the first down step. See pp. 8-10 in Lazar and Linusson.

Examples

			Triangle begins:
    0;
    0,   1;
    1,   1,   1;
    2,   3,   2,   1;
    5,   9,   6,   3,  1;
   14,  28,  21,  10,  4,  1;
   42,  90,  76,  39, 15,  5, 1;
  132, 297, 276, 159, 64, 21, 6, 1;
  ...
		

Crossrefs

Cf. A000108, A026013, A057427 (diagonal), A071724, A375086 (row sums).

Programs

  • Mathematica
    T[n_,k_]:=Binomial[2n-2,n-k-1]-Binomial[2n-2,n-k-2]+Binomial[n-2,n-k]; Table[T[n,k],{n,0,10},{k,0,n}]//Flatten
  • Python
    from math import isqrt
    from sympy import binomial
    def A375085(n):
        a = (m:=isqrt(k:=n+1<<1))-(k<=m*(m+1))
        b = n-binomial(a+1,2)
        return int(binomial(c:=a-1<<1,d:=a-b-1)-binomial(c,d-1)+binomial(a-2,d+1)) if n else 0 # Chai Wah Wu, Nov 14 2024

Formula

T(n,k) = binomial(2*n-2,n-k-1) - binomial(2*n-2,n-k-2) + binomial(n-2,n-k).
T(n,0) = A000108(n-1).
T(n,1) = A071724(n-1) for n > 0.
T(n+1,2) - T(n,2) = A026013(n-1) for n > 2.

A097608 Triangle read by rows: number of Dyck paths of semilength n and having abscissa of the leftmost valley equal to k (if no valley, then it is taken to be 2n; 2<=k<=2n).

Original entry on oeis.org

1, 1, 0, 1, 2, 1, 1, 0, 1, 5, 3, 3, 1, 1, 0, 1, 14, 9, 9, 4, 3, 1, 1, 0, 1, 42, 28, 28, 14, 10, 4, 3, 1, 1, 0, 1, 132, 90, 90, 48, 34, 15, 10, 4, 3, 1, 1, 0, 1, 429, 297, 297, 165, 117, 55, 35, 15, 10, 4, 3, 1, 1, 0, 1, 1430, 1001, 1001, 572, 407, 200, 125, 56, 35, 15, 10, 4, 3, 1, 1, 0, 1
Offset: 1

Views

Author

Emeric Deutsch, Aug 30 2004, Dec 22 2004

Keywords

Comments

A valley point is a path vertex that is preceded by a downstep and followed by an upstep (or by nothing at all). T(n,k) is the number of Dyck n-paths whose first valley point is at position k, 2<=k<=2n. - David Callan, Mar 02 2005
Row n has 2n-1 terms.
Row sums give the Catalan numbers (A000108).
Columns k=2 through 7 are respectively A000108, A000245, A071724, A002057, A071725, A026013. The nonzero entries in the even-indexed columns approach A088218 and similarly the odd-indexed columns approach A001791.

Examples

			Triangle begins
\ k..2...3...4...5...6...7....
n
1 |..1
2 |..1...0...1
3 |..2...1...1...0...1
4 |..5...3...3...1...1...0...1
5 |.14...9...9...4...3...1...1...0...1
6 |.42..28..28..14..10...4...3...1...1...0...1
7 |132..90..90..48..34..15..10...4...3...1...1...0...1
T(4,3)=3 because we have UU(DU)DDUD, UU(DU)DUDD and UU(DU)UDDD, where U=(1,1), D=(1,-1) (the first valley, with abscissa 3, is shown between parentheses).
		

Crossrefs

Programs

  • Maple
    G:=t^2*z*C*(1-t*z)/(1-t^2*z)/(1-t*z*C): C:=(1-sqrt(1-4*z))/2/z: Gser:=simplify(series(G,z=0,11)): for n from 1 to 10 do P[n]:=coeff(Gser,z^n) od: seq(seq(coeff(P[n],t^k),k=2..2*n),n=1..10);

Formula

G.f.=t^2*zC(1-tz)/[(1-t^2*z)(1-tzC)], where C=[1-sqrt(1-4z)]/(2z) is the Catalan function.
G.f. Sum_{2<=k<=2n}T(n, k)x^n*y^k = ((1 - (1 - 4*x)^(1/2))*y^2*(1 - x*y))/(2*(1 - ((1 - (1 - 4*x)^(1/2))*y)/2)*(1 - x*y^2)). With G:= (1 - (1 - 4*x)^(1/2))/2, the gf for column 2k is G(G^(2k+1)(G-x)-x^(k+1)(1-G))/(G^2-x) and for column 2k+1 is G(G-x)(G^(2k+2)-x^(k+1))/(G^2-x). - David Callan, Mar 02 2005

Extensions

Edited by N. J. A. Sloane at the suggestion of Andrew S. Plewe, Jun 23 2007
Showing 1-3 of 3 results.