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

A132885 Triangle read by rows: T(n,k) is the 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), having k H=(2,0) steps (0 <= k <= floor(n/2)).

Original entry on oeis.org

1, 1, 3, 1, 7, 2, 19, 9, 1, 51, 28, 3, 141, 95, 18, 1, 393, 306, 70, 4, 1107, 987, 285, 30, 1, 3139, 3144, 1071, 140, 5, 8953, 9963, 3948, 665, 45, 1, 25653, 31390, 14148, 2856, 245, 6, 73789, 98483, 49815, 11844, 1330, 63, 1, 212941, 307836, 172645, 47160
Offset: 0

Views

Author

Emeric Deutsch, Sep 03 2007

Keywords

Comments

Row n has 1+floor(n/2) terms. T(n,0)=A002426(n) (the central trinomial coefficients). T(n,1)=A109188(n-1). Row sums yield A059345. See A132280 for the same statistic on paths restricted to the first quadrant.

Examples

			T(4,1)=9 because we have hhH, hHh, Hhh, HUD, UDH, UHD, HDU, DUH and DHU.
Triangle starts:
                     1;
                     1;
                 3,      1;
                 7,      2;
            19,      9,      1;
            51,     28,      3;
       141,     95,     18,      1;
       393,    306,     70,      4;
  1107,    987,    285,     30,      1;
  3139,   3144,   1071,    140,      5;
		

Crossrefs

Columns k=0..3 give A002426, A109188(n-1), A373651(n-4), A375260(n-6).
Row sums gives A059345.
Cf. A132280.

Programs

  • Maple
    G:=1/sqrt((1+z-t*z^2)*(1-3*z-t*z^2)): Gser:=simplify(series(G,z=0,18)): for n from 0 to 13 do P[n]:=sort(coeff(Gser,z,n)) 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
    A132885 := (n,k) -> binomial(n-k,k)*hypergeom([k-n/2,k-n/2+1/2], [1], 4): seq(print(seq(round(evalf(A132885(n,k))),k=0..iquo(n,2))),n=0..9); # Peter Luschny, Sep 18 2014
  • Mathematica
    T[n_, k_] := Binomial[n - k, k]*Hypergeometric2F1[k - n/2, k - n/2 + 1/2, 1, 4]; Table[T[n, k], {n,0,10}, {k, 0, Floor[n/2]}] // Flatten  (* G. C. Greubel, Mar 01 2017 *)

Formula

G.f.: 1/sqrt((1+z-t*z^2)*(1-3*z-t*z^2)).
T(n,k) = C(n-k,k)*hypergeom([k-n/2,k-n/2+1/2], [1], 4). - Peter Luschny, Sep 18 2014

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

A160905 Right hand side of Pascal rhombus A059317.

Original entry on oeis.org

1, 1, 1, 4, 2, 1, 9, 8, 3, 1, 29, 22, 13, 4, 1, 82, 72, 42, 19, 5, 1, 255, 218, 146, 70, 26, 6, 1, 773, 691, 476, 261, 107, 34, 7, 1, 2410, 2158, 1574, 914, 428, 154, 43, 8, 1, 7499, 6833, 5122, 3177, 1603, 659, 212, 53, 9, 1, 23575, 21612, 16706, 10816, 5867, 2628, 967
Offset: 0

Views

Author

Paul Barry, May 29 2009

Keywords

Comments

Riordan array (1/sqrt((1+x-x^2)*(1-3*x-x^2)), (1-x-x^2-sqrt((1+x-x^2)*(1-3*x-x^2)))/(2*x)). Can be factored as
(1/(1-x-x^2), x/(1-x-x^2))*(1/sqrt(1-4x^2),xc(x^2)) = (1/(1-x^2),x/(1-x^2))*(1/(1-x),x/(1-x))*(1/sqrt(1-4x^2),xc(x^2))
and (1/(1-x^2),x/(1-x^2))*(1/sqrt(1-2x-3x^2),(1-x-sqrt(1-2x-3x^2))/(2x)).
Here, c(x) is the g.f. of the Catalan numbers A000108.

Examples

			Triangle begins:
    1;
    1,   1;
    4,   2,   1;
    9,   8,   3,  1;
   29,  22,  13,  4,  1;
   82,  72,  42, 19,  5, 1;
  255, 218, 146, 70, 26, 6, 1;
  ...
		

Crossrefs

Left column gives A059345.
Cf. A059317.

Formula

Number triangle T(n,k) = Sum_{i=0..n} (Sum_{j=0..n} C((n+j)/2,j)*C(j,i)*(1+(-1)^(n-j))/2)*C(i,(i-k)/2)*(1+(-1)^(i-k))/2;
T(n,k) = Sum_{j=0..n} C((n+j)/2,j)*((1+(-1)^(n-j))/2)*Sum_{i=0..j} C(j,i)*C(i,j-k-i).

A132884 Triangle read by rows: T(n,k) is the 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), having k h=(1,0) steps (0<=k<=n).

Original entry on oeis.org

1, 0, 1, 3, 0, 1, 0, 8, 0, 1, 13, 0, 15, 0, 1, 0, 57, 0, 24, 0, 1, 63, 0, 156, 0, 35, 0, 1, 0, 384, 0, 340, 0, 48, 0, 1, 321, 0, 1380, 0, 645, 0, 63, 0, 1, 0, 2505, 0, 3800, 0, 1113, 0, 80, 0, 1, 1683, 0, 11145, 0, 8855, 0, 1792, 0, 99, 0, 1, 0, 16008, 0, 37065, 0, 18368, 0, 2736, 0
Offset: 0

Views

Author

Emeric Deutsch, Sep 03 2007

Keywords

Comments

T(2n,0)=A001850(n) (the central Delannoy numbers); T(2n+1,0)=0. T(2n,1)=0; T(2n-1,1)=A108666(n). T(n,k)=0 if n+k is odd. Row sums yield A059345. See A132277 for the same statistic on paths restricted to the first quadrant.

Examples

			Triangle starts:
   1;
   0,  1;
   3,  0,  1;
   0,  8,  0,  1;
  13,  0, 15,  0,  1;
   0, 57,  0, 24,  0,  1;
T(3,1)=8 because we have hH, Hh, hUD, UhD, UDh, hDU, DhU and DUh.
		

Crossrefs

Programs

  • Maple
    G:=1/sqrt((1-t*z-z^2)^2-4*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. = 1/sqrt((1-tz-z^2)^2-4z^2).

A132886 Triangle read by rows: T(n,k) is the 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), having k U steps (0 <= k <= floor(n/2)).

Original entry on oeis.org

1, 1, 2, 2, 3, 6, 5, 18, 6, 8, 44, 30, 13, 102, 120, 20, 21, 222, 390, 140, 34, 466, 1140, 700, 70, 55, 948, 3066, 2800, 630, 89, 1884, 7770, 9800, 3780, 252, 144, 3672, 18780, 31080, 17850, 2772, 233, 7044, 43710, 91560, 72450, 19404, 924, 377, 13332, 98610
Offset: 0

Views

Author

Emeric Deutsch, Sep 03 2007

Keywords

Comments

Row n has 1+floor(n/2) terms. T(n,0) = A000045(n+1) (the Fibonacci numbers). T(2n,n) = binomial(2n,n) = A000984(n) (the central binomial coefficients). Row sums yield A059345. Column k has g.f. = binomial(2k,k)*z^(2k)/(1-z-z^2)^(2k+1); accordingly, T(n,1) = 2*A001628(n-2), T(n,2) = 6*A001873(n-4), T(n,3) = 20*A001875(n-6). See A132883 for the same statistic on paths restricted to the first quadrant.

Examples

			Triangle starts:
   1;
   1;
   2,   2;
   3,   6;
   5,  18,   6;
   8,  44,  30;
  13, 102, 120,  20;
T(3,1)=6 because we have hUD, UhD, UDh, hDU, DhU and DUh.
		

Crossrefs

Programs

  • Maple
    G:=1/sqrt((1-z-z^2)^2-4*t*z^2): Gser:=simplify(series(G,z=0,17)): for n from 0 to 13 do P[n]:= sort(coeff(Gser,z,n)) 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(t,z) = 1/sqrt((1-z-z^2)^2 - 4tz^2).
Showing 1-6 of 6 results.