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

A059317 Pascal's "rhombus" (actually a triangle T(n,k), n >= 0, 0<=k<=2n) read by rows: each entry is sum of 3 terms above it in previous row and one term above it two rows back.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 4, 2, 1, 1, 3, 8, 9, 8, 3, 1, 1, 4, 13, 22, 29, 22, 13, 4, 1, 1, 5, 19, 42, 72, 82, 72, 42, 19, 5, 1, 1, 6, 26, 70, 146, 218, 255, 218, 146, 70, 26, 6, 1, 1, 7, 34, 107, 261, 476, 691, 773, 691, 476, 261, 107, 34, 7, 1, 1, 8, 43, 154, 428, 914, 1574, 2158
Offset: 0

Views

Author

N. J. A. Sloane, Jan 26 2001

Keywords

Comments

The rows have lengths 1, 3, 5, 7, ...; cf. A005408.
T(n,k) is the number of paths in the right half-plane from (0,0) to (n,k-n), consisting of steps U=(1,1), D=(1,-1), h=(1,0) and H=(2,0). Example: T(3,4)=8 because we have hhU, HU, hUh, Uhh, UH, DUU, UDU and UUD. Row sums yield A006190. - Emeric Deutsch, Sep 03 2007
Let p(n,x) denote the Fibonacci polynomial, defined by p(1,x) = 1, p(2,x) = x, p(n,x) = x*p(n-1,x) + p(n-2,x). The coefficients of the numerator polynomial of the rational function p(n, x + 1 + 1/x) form row n of the triangle A059317; the first three numerator polynomials are 1, 1 + x + x^2, 1 + 2*x + 4*x^2 + 2*x^3 + x^4. - Clark Kimberling, Nov 04 2013

Examples

			Triangle begins:
  1;
  1, 1, 1;
  1, 2, 4, 2, 1;
  1, 3, 8, 9, 8, 3, 1;
  ...
		

References

  • Lin Yang and S.-L. Yang, The parametric Pascal rhombus. Fib. Q., 57:4 (2019), 337-346.

Crossrefs

Cf. A059318, A007318. Row sums give A006190. Central column is A059345.
Cf. also A006190, A140750.

Programs

  • Haskell
    -- import Data.List (zipWith4)
    a059317 n k = a059317_tabf !! n !! k
    a059317_row n = a059317_tabf !! n
    a059317_tabf = [1] : [1,1,1] : f [1] [1,1,1] where
       f ws vs = vs' : f vs vs' where
         vs' = zipWith4 (\r s t x -> r + s + t + x)
               (vs ++ [0,0]) ([0] ++ vs ++ [0]) ([0,0] ++ vs)
               ([0,0] ++ ws ++ [0,0])
    -- Reinhard Zumkeller, Jun 30 2012
  • Maple
    r:=proc(i,j) option remember; if i=0 then 0 elif i=1 and abs(j)>0 then 0 elif i=1 and j=0 then 1 elif i>=1 then r(i-1,j)+r(i-1,j-1)+r(i-1,j+1)+r(i-2,j) else 0 fi end: seq(seq(r(i,j),j=-i+1..i-1),i=0..9); # Emeric Deutsch, Jun 06 2004
    g:=1/(1-z-z*w-z*w^2-z^2*w^2): gser:=simplify(series(g,z=0,10)): for n from 0 to 8 do P[n]:=sort(coeff(gser,z,n)) end do: for n from 0 to 8 do seq(coeff(P[n],w,k),k=0..2*n) end do; # yields sequence in triangular form; Emeric Deutsch, Sep 03 2007
  • Mathematica
    t[0, 0] = t[1, 0] = t[1, 1] = t[1, 2] = 1; t[n_ /; n >= 0, k_ /; k >= 0] /; k <= 2n := t[n, k] = t[n-1, k] + t[n-1, k-1] + t[n-1, k-2] + t[n-2, k-2]; t[n_, k_] /; n < 0 || k < 0 || k > 2n = 0; Flatten[ Table[ t[n, k], {n, 0, 8}, {k, 0, 2n}]] (* Jean-François Alcover, Feb 01 2012 *)

Formula

T(n+1, k) = T(n, k-1) + T(n, k) + T(n, k+1) + T(n-1, k).
Another definition: T(i, j) is defined for i >= 0, -infinity <= j <= infinity; T(i, j) = T(i-1, j) + T(i-1, j-1) + T(i-1, j-2) + T(i-2, j-2) for i >= 2, all j; T(0, 0) = T(1, 1) = T(1, 1) = T(1, 2) = 1; T(0, j) = 0 for j != 0; T(1, j) = 0 for j != 0, 1, 2.
G.f.: Sum_{n>=0, k=0..2*n} T(n, k)*z^n*w^k = 1/(1-z-z*w-z*w^2-z^2*w^2).
There does not seem to be a simple expression for T(n, k). [That may have been true in 2001, but it is no longer true, as the following formulas show. - N. J. A. Sloane, Jan 22 2016]
If the rows of the sequence are displayed in the shape of an isosceles triangle, then, for k>=0, columns k and -k have g.f. z^k*g^k/sqrt((1+z-z^2)(1-3z-z^2)), where g=1+zg+z^2*g+z^2*g^2=[1-z-z^2-sqrt((1+z-z^2)(1-3z--z^2))]/(2z^2). - Emeric Deutsch, Sep 03 2007
T(i,j) = Sum_{m=0..i} Sum_{l=0..i-j-2*m} binomial(2*m+j,m)*binomial(l+j+2*m,l)*binomial(l,i-j-2*m-l) (see Ramirez link). - José Luis Ramírez Ramírez, Nov 18 2015
The e.g.f of the j-th column of the Pascal rhombus is L_j(x)=(F(x)^(j+1)*C(F(x)^2)^j)/(x*(1-2*F(x)^2*C(F(x)^2))), where F(x) and C(x) are the generating function of the Fibonacci numbers and Catalan numbers. - José Luis Ramírez Ramírez, Nov 18 2015

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Jan 30 2001

A059345 Central column of Pascal's "rhombus" (actually a triangle) A059317.

Original entry on oeis.org

1, 1, 4, 9, 29, 82, 255, 773, 2410, 7499, 23575, 74298, 235325, 747407, 2381126, 7603433, 24332595, 78013192, 250540055, 805803691, 2595158718, 8368026845, 27012184877, 87283372610, 282294378071, 913775677281, 2960160734818
Offset: 0

Views

Author

N. J. A. Sloane, Jan 27 2001

Keywords

Comments

Number of paths in the right half-plane from (0,0) to (n,0) consisting of steps U=(1,1), D=(1,-1), h=(1,0) and H=(2,0). Example: a(3)=9 because we have hhh, hH, Hh, hUD, hDU, UhD, DhU, UDh and DUh. The number of such paths restricted to the first quadrant is given in A128720. - Emeric Deutsch, Sep 03 2007
Number of lattice paths from (0,0) to (n,n) using steps (1,0), (1,1), (1,2), (2,2). - Joerg Arndt, Jun 30 2011
Other two columns of the triangle in A059317 are given in A106053 and A106050. - Emeric Deutsch, Sep 03 2007

References

  • Lin Yang and S.-L. Yang, The parametric Pascal rhombus. Fib. Q., 57:4 (2019), 337-346.

Crossrefs

Cf. A181545. - Paul D. Hanna, Oct 29 2010

Programs

  • Maple
    r:=proc(i,j) if i=0 then 0 elif i=1 and abs(j)>0 then 0 elif i=1 and j=0 then 1 elif i>=1 then r(i-1,j)+r(i-1,j-1)+r(i-1,j+1)+r(i-2,j) else 0 fi end: seq(r(i,0),i=1..12); # very slow; Emeric Deutsch, Jun 06 2004
    G:=1/sqrt((1+z-z^2)*(1-3*z-z^2)): Gser:=series(G,z=0,30): seq(coeff(Gser,z, n),n=0..27); # Emeric Deutsch, Sep 03 2007
    a[0]:=1: a[1]:=1: a[2]:=4: a[3]:=9: for n from 3 to 26 do a[n+1]:=((2*n+1)*a[n]+5*n*a[n-1]-(2*n-1)*a[n-2]-(n-1)*a[n-3])/(n+1) end do: seq(a[n],n=0..27); # Emeric Deutsch, Sep 03 2007
  • Mathematica
    CoefficientList[Series[1/Sqrt[(1+x-x^2)(1-3x-x^2)],{x,0,40}],x] (* Harvey P. Dale, Jun 04 2011 *)
    a[n_] := Sum[Binomial[n-k, k]*Hypergeometric2F1[(2*k-n)/2, (2*k-n+1)/2, 1, 4], {k, 0, Floor[n/2]}]; Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Nov 26 2015 *)
  • PARI
    {a(n)=polcoeff(sum(m=0,n,x^(2*m)/(1-x-x^2+x*O(x^n))^(2*m+1)*(2*m)!/(m!)^2),n)} \\ Paul D. Hanna, Oct 29 2010
    
  • PARI
    /* same as in A092566 but use */
    steps=[[1,0], [1,1], [1,2], [2,2]];
    /* Joerg Arndt, Jun 30 2011 */

Formula

G.f.: 1/sqrt((1+z-z^2)*(1-3*z-z^2)). - Emeric Deutsch, Sep 03 2007
D-finite with recurrence: (n+1)*a(n+1)=(2*n+1)*a(n)+5*n*a(n-1)-(2*n-1)*a(n-2)-(n-1)*a(n-3). - Emeric Deutsch, Sep 03 2007
a(n) = sum{k=0..floor(n/2), C(n-k,k)*A002426(n-2k)}. - Paul Barry, Nov 29 2008
G.f.: A(x) = Sum_{n>=0} (2*n)!/(n!)^2 * x^(2n)/(1-x-x^2)^(2n+1). - Paul D. Hanna, Oct 29 2010
a(n) ~ sqrt((3+11/sqrt(13))/8) * ((3+sqrt(13))/2)^n/sqrt(Pi*n). - Vaclav Kotesovec, Aug 11 2013

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Jan 30 2001

A106050 Column two-from-center of triangle A059317.

Original entry on oeis.org

0, 0, 0, 1, 3, 13, 42, 146, 476, 1574, 5122, 16706, 54256, 176254, 571954, 1856245, 6023681, 19551939, 63476314, 206145075, 669695819, 2176401235, 7075521724, 23011145314, 74864599954, 243652588070, 793264765396, 2583532274289, 8416929889967, 27430452311513
Offset: 0

Views

Author

N. J. A. Sloane, May 28 2005

Keywords

Comments

Number of paths in the right-half-plane from (0,0) to (n-1,2) consisting of steps U=(1,1), D=(1,-1), h=(1,0) and H=(2,0). Example: a(4)=3 because we have hUU, UhU and UUh. - Emeric Deutsch, Sep 03 2007

Crossrefs

Programs

  • Maple
    g:=((1-z-z^2-sqrt((1+z-z^2)*(1-3*z-z^2)))*1/2)/z^2: gser:=series(z^3*g^2/sqrt((1+z-z^2)*(1-3*z-z^2)),z=0,32): seq(coeff(gser,z,n),n=0..30); # Emeric Deutsch, Sep 03 2007
  • Mathematica
    t[0, 0] = t[1, 0] = t[1, 1] = t[1, 2] = 1;
    t[n_ /; n >= 0, k_ /; k >= 0] /; k <= 2 n := t[n, k] = t[n-1, k] + t[n-1, k-1] + t[n-1, k-2] + t[n-2, k-2];
    t[n_, k_] /; n<0 || k<0 || k>2n = 0;
    a[n_] := t[n-1, n-3];
    Table[a[n], {n, 0, 29}] (* Jean-François Alcover, Aug 07 2018 *)

Formula

G.f.: z^3*g^2/sqrt((1+z-z^2)(1-3z-z^2)), where g=1+zg+z^2*g+z^2*g^2=[1-z-z^2-sqrt((1+z-z^2)(1-3z--z^2))]/(2z^2). - Emeric Deutsch, Sep 03 2007

A132277 Triangle read by rows: T(n,k) is number of paths in the first quadrant from (0,0) to (n,0) using steps U=(1,1), D=(1,-1), h=(1,0) and H=(2,0), having exactly k h-steps.

Original entry on oeis.org

1, 0, 1, 2, 0, 1, 0, 5, 0, 1, 6, 0, 9, 0, 1, 0, 25, 0, 14, 0, 1, 22, 0, 66, 0, 20, 0, 1, 0, 129, 0, 140, 0, 27, 0, 1, 90, 0, 450, 0, 260, 0, 35, 0, 1, 0, 681, 0, 1210, 0, 441, 0, 44, 0, 1, 394, 0, 2955, 0, 2765, 0, 700, 0, 54, 0, 1, 0, 3653, 0, 9625, 0, 5642, 0, 1056, 0, 65, 0, 1
Offset: 0

Views

Author

Emeric Deutsch, Aug 26 2007

Keywords

Comments

T(2n+1,0)=0; T(2n,0)=A006318(n) (the large Schroeder numbers). Row sums yield A128720. Sum(k*T(n,k),k=0..n)=A106053(n+1).

Examples

			T(4,2)=9 because we have hhH, hhUD, hHh, hUDh, Hhh, UDhh, hUhD, UhDh and UhhD.
		

Crossrefs

Programs

  • Maple
    G:=((1-t*z-z^2-sqrt((1-2*z-t*z-z^2)*(1+2*z-t*z-z^2)))*1/2)/z^2: Gser:=simplify(series(G,z=0,15)): for n from 0 to 11 do P[n] := sort(coeff(Gser, z, n)) end do: for n from 0 to 11 do seq(coeff(P[n],t,j),j=0..n) end do; # yields sequence in triangular form

Formula

G.f. G=G(t,z) satisfies G = 1 + tzG + z^2*G + z^2*G^2 (see explicit expression at the Maple program).

A267192 Column 3 of triangle in A059317 (the Pascal "Rhombus").

Original entry on oeis.org

0, 0, 0, 1, 4, 19, 70, 261, 914, 3177, 10816, 36566, 122552, 408840, 1358032, 4497995, 14862112, 49019688, 161449208, 531152855, 1745892452, 5734722698, 18826352472, 61777432510, 202648614072, 664569581090, 2178948104572, 7143067052707, 23413795288008
Offset: 0

Views

Author

N. J. A. Sloane, Jan 22 2016

Keywords

Crossrefs

Programs

  • Maple
    T:= proc(n, k) option remember; `if`(min(n, k)<0, 0,
          `if`(k=0, 1, T(n-1, k)+T(n-1, k-1)+T(n-1, k-2)+T(n-2, k-2)))
        end:
    a:= n-> T(n, n-3):
    seq(a(n), n=0..30);  # Alois P. Heinz, Jan 24 2016
  • Mathematica
    T[n_, k_] := T[n, k] = If[Min[n, k]<0, 0, If[k == 0, 1, T[n-1, k] + T[n-1, k-1] + T[n-1, k-2] + T[n-2, k-2]]];
    a[n_] := T[n, n-3];
    Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Jun 23 2017, after Alois P. Heinz *)

Formula

Conjecture: +(n-2)*(n-3)*(n+3)*a(n) -n*(2*n-1)*(n-2)*a(n-1) -(n-1)*(5*n^2-10*n+18)*a(n-2) +n*(2*n-3)*(n-2)*a(n-3) +n*(n+1)*(n-5)*a(n-4)=0. - R. J. Mathar, Jul 23 2017

Extensions

More terms from Alois P. Heinz, Jan 24 2016

A132280 Triangle read by rows: T(n,k) is the number of paths in the first quadrant from (0,0) to (n,0), consisting of steps U=(1,1), D=(1,-1), h=(1,0) and H=(2,0), having k H steps (0<=k<=floor(n/2)).

Original entry on oeis.org

1, 1, 2, 1, 4, 2, 9, 6, 1, 21, 16, 3, 51, 45, 12, 1, 127, 126, 40, 4, 323, 357, 135, 20, 1, 835, 1016, 441, 80, 5, 2188, 2907, 1428, 315, 30, 1, 5798, 8350, 4572, 1176, 140, 6, 15511, 24068, 14535, 4284, 630, 42, 1, 41835, 69576, 45925, 15240, 2646, 224, 7
Offset: 0

Views

Author

Emeric Deutsch, Sep 03 2007

Keywords

Comments

Also, T(n,k) is the number of paths in the first quadrant from (0,0) to (n,0), consisting of steps U=(1,1), D=(1,-1), h=(1,0) and H=(2,0), having k peaks (i.e., UD's). Row n contains 1+floor(n/2) terms. T(n,0) = A001006(n) (the Motzkin numbers). Row sums yield A128720. Sum(k*T(n,k), k>=0) = A106053(n).
Shifting every column k of this triangle k steps upwards yields triangle A091869, but with another offset. - Werner Schulte, Feb 03 2017

Examples

			Triangle starts:
1;
1;
2,1;
4,2;
9,6,1;
21,16,3;
51,45,12,1;
T(5,2)=3 because we have hHH, HhH and HHh.
		

Crossrefs

Programs

  • Maple
    G:=((1-z-t*z^2-sqrt((1+z-t*z^2)*(1-3*z-t*z^2)))*1/2)/z^2: Gser:=simplify(series(G,z=0,17)): for n from 0 to 13 do P[n]:=sort(coeff(Gser,z,n),n=0..13) end do: for n from 0 to 13 do seq(coeff(P[n],t,j),j=0..floor((1/2)*n)) end do; # yields sequence in triangular form

Formula

G.f. = G = G(t,z) satisfies G = 1+zG+tz^2*G+z^2*G^2 (see explicit expression at the Maple program).

Extensions

Keyword tabf added by Michel Marcus, Apr 09 2013
Showing 1-6 of 6 results.