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

A036355 Fibonacci-Pascal triangle read by rows.

Original entry on oeis.org

1, 1, 1, 2, 2, 2, 3, 5, 5, 3, 5, 10, 14, 10, 5, 8, 20, 32, 32, 20, 8, 13, 38, 71, 84, 71, 38, 13, 21, 71, 149, 207, 207, 149, 71, 21, 34, 130, 304, 478, 556, 478, 304, 130, 34, 55, 235, 604, 1060, 1390, 1390, 1060, 604, 235, 55, 89, 420, 1177, 2272, 3310, 3736, 3310, 2272, 1177, 420, 89
Offset: 0

Views

Author

Floor van Lamoen, Dec 28 1998

Keywords

Comments

T(n,k) is the number of lattice paths from (0,0) to (n-k,k) using steps (1,0),(2,0),(0,1),(0,2). - Joerg Arndt, Jun 30 2011, corrected by Greg Dresden, Aug 25 2020
For a closed-form formula for arbitrary left and right borders of Pascal like triangle see A228196. - Boris Putievskiy, Aug 18 2013
For a closed-form formula for generalized Pascal's triangle see A228576. - Boris Putievskiy, Sep 09 2013

Examples

			Triangle begins
   1;
   1,   1;
   2,   2,   2;
   3,   5,   5,    3;
   5,  10,  14,   10,    5;
   8,  20,  32,   32,   20,    8;
  13,  38,  71,   84,   71,   38,   13;
  21,  71, 149,  207,  207,  149,   71,  21;
  34, 130, 304,  478,  556,  478,  304, 130,  34;
  55, 235, 604, 1060, 1390, 1390, 1060, 604, 235, 55;
with indices
  T(0,0);
  T(1,0),  T(1,1);
  T(2,0),  T(2,1),  T(2,2);
  T(3,0),  T(3,1),  T(3,2),  T(3,3);
  T(4,0),  T(4,1),  T(4,2),  T(4,3),  T(4,4);
For example, T(4,2) = 14 and there are 14 lattice paths from (0,0) to (4-2,2) = (2,2) using steps (1,0),(2,0),(0,1),(0,2). - _Greg Dresden_, Aug 25 2020
		

Crossrefs

Row sums form sequence A002605. T(n, 0) forms the Fibonacci sequence (A000045). T(n, 1) forms sequence A001629.
Derived sequences: A036681, A036682, A036683, A036684, A036692 (central terms).
Some other Fibonacci-Pascal triangles: A027926, A037027, A074829, A105809, A109906, A111006, A114197, A162741, A228074.

Programs

  • Haskell
    a036355 n k = a036355_tabl !! n !! k
    a036355_row n = a036355_tabl !! n
    a036355_tabl = [1] : f [1] [1,1] where
       f us vs = vs : f vs (zipWith (+)
                           (zipWith (+) ([0,0] ++ us) (us ++ [0,0]))
                           (zipWith (+) ([0] ++ vs) (vs ++ [0])))
    -- Reinhard Zumkeller, Apr 23 2013
  • Mathematica
    nmax = 11; t[n_, m_] := t[n, m] = tp[n-1, m-1] + tp[n-2, m-2] + tp[n-1, m] + tp[n-2, m]; tp[n_, m_] /; 0 <= m <= n && n >= 0 := t[n, m]; tp[n_, m_] = 0; t[0, 0] = 1; Flatten[ Table[t[n, m], {n, 0, nmax}, {m, 0, n}]] (* Jean-François Alcover, Nov 09 2011, after formula *)
  • PARI
    /* same as in A092566 but use */
    steps=[[1,0], [2,0], [0,1], [0,2]];
    /* Joerg Arndt, Jun 30 2011 */
    

Formula

T(n, m) = T'(n-1, m-1)+T'(n-2, m-2)+T'(n-1, m)+T'(n-2, m), where T'(n, m) = T(n, m) if 0<=m<=n and n >= 0 and T'(n, m)=0 otherwise. Initial term T(0, 0)=1.
G.f.: 1/(1-(1+y)*x-(1+y^2)*x^2). - Vladeta Jovovic, Oct 11 2003

A192364 Number of lattice paths from (0,0) to (n,n) using steps (0,1),(0,2),(1,0),(2,0),(1,1).

Original entry on oeis.org

1, 3, 21, 157, 1239, 10047, 82951, 693603, 5854581, 49778997, 425712429, 3657968097, 31555053921, 273109567797, 2370474720369, 20625186298269, 179841473895447, 1571088267426447, 13747953837604959, 120482775658910763, 1057293764707074027, 9289536349244758791, 81709329486947791419
Offset: 0

Views

Author

Eric Werley, Jun 29 2011

Keywords

Crossrefs

Cf. A091533.

Programs

  • Mathematica
    FullSimplify[CoefficientList[Series[(3-6*x+Sqrt[-1+4*x*(9*x-11)+4*Sqrt[1-x]*Sqrt[5+4*x]*Sqrt[9*x-1]])/(Sqrt[10+8*x]*Sqrt[(1-x)*(1-9*x)]*(4*x*(9*x-11)-1+4*Sqrt[1-x]*Sqrt[5+4*x]*Sqrt[9*x-1])^(1/4)), {x, 0, 10}], x]]
  • PARI
    /* same as in A092566 but use */
    steps=[[0,1], [0,2], [1,0], [2,0], [1,1]];
    /* Joerg Arndt, Jun 30 2011 */

Formula

From Vaclav Kotesovec, Oct 24 2012: (Start)
G.f.: (3 - 6*x + sqrt(-1 + 4*x*(9*x-11) + 4*sqrt(1-x)*sqrt(5+4*x)*sqrt(9*x-1))) / (sqrt(10+8*x)*sqrt((1-x)*(1-9*x))*(4*x*(9*x-11)-1+4*sqrt(1-x)*sqrt(5+4*x)*sqrt(9*x-1))^(1/4))
D-finite with recurrence: 15*(n-1)*n*a(n) = (n-1)*(133*n-54)*a(n-1) + (31*n^2 - 177*n + 224)*a(n-2) - (113*n^2 - 295*n + 144)*a(n-3) - 18*(n-3)*(2*n-5)*a(n-4)
a(n) ~ 3^(2*n+3/2)/(2*sqrt(14*Pi*n))
(End)
a(n) = A091533(2*n,n) for n >= 0. - Paul D. Hanna, Dec 11 2018
a(n) = [x^n*y^n] 1/(1 - x - y - x^2 - x*y - y^2) for n >= 0. - Paul D. Hanna, Dec 11 2018

Extensions

Terms > 425712429 by Joerg Arndt, Jun 30 2011

A090174 Triangle read by rows, related to Pascal's triangle read mod 2.

Original entry on oeis.org

1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1
Offset: 0

Views

Author

N. J. A. Sloane, Jan 19 2004

Keywords

Examples

			1; 1,1; 0,1,0; 1,1,1,1; 1,1,1,1,1; ...
		

Crossrefs

Formula

a(n, k) = A091533(n, k) mod 2.

Extensions

Edited and extended by Christian G. Bower, Jan 19 2004

A328300 Number T(n,k) of n-step walks on cubic lattice starting at (0,0,0), ending at (0,k,n-k), remaining in the first (nonnegative) octant and using steps (0,0,1), (0,1,0), (1,0,0), (-1,1,1), (1,-1,1), and (1,1,-1); triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 1, 7, 7, 1, 1, 15, 26, 15, 1, 1, 31, 82, 82, 31, 1, 1, 63, 237, 343, 237, 63, 1, 1, 127, 651, 1257, 1257, 651, 127, 1, 1, 255, 1730, 4256, 5594, 4256, 1730, 255, 1, 1, 511, 4494, 13669, 22411, 22411, 13669, 4494, 511, 1, 1, 1023, 11485, 42279, 83680, 103730, 83680, 42279, 11485, 1023, 1
Offset: 0

Views

Author

Alois P. Heinz, Oct 11 2019

Keywords

Examples

			Triangle T(n,k) begins:
  1;
  1,   1;
  1,   3,    1;
  1,   7,    7,    1;
  1,  15,   26,   15,    1;
  1,  31,   82,   82,   31,    1;
  1,  63,  237,  343,  237,   63,    1;
  1, 127,  651, 1257, 1257,  651,  127,   1;
  1, 255, 1730, 4256, 5594, 4256, 1730, 255, 1;
  ...
		

Crossrefs

Columns k=0-1 give: A000012, A000225.
Row sums give A328296.
T(2n,n) gives A328269.
T(n,floor(n/2)) gives A328280.

Programs

  • Maple
    b:= proc(l) option remember; `if`(l[-1]=0, 1, (r-> add(
          add(add(`if`(i+j+k=1, (h-> `if`(h[1]<0, 0, b(h)))(
          sort(l-[i, j, k])), 0), k=r), j=r), i=r))([$-1..1]))
        end:
    T:= (n, k)-> b(sort([0, k, n-k])):
    seq(seq(T(n, k), k=0..n), n=0..12);
  • Mathematica
    b[l_List] := b[l] = If[l[[-1]] == 0, 1, Function[r, Sum[Sum[Sum[If[i + j + k == 1, Function[h, If[h[[1]] < 0, 0, b[h]]][Sort[l - {i, j, k}]], 0], {k, r}], {j, r}], {i, r}]][{-1, 0, 1}]];
    T[n_, k_] := b[Sort[{0, k, n - k}]];
    Table[T[n, k], {n, 0, 12}, {k, 0, n}] // Flatten (* Jean-François Alcover, May 10 2020, after Maple *)

Formula

T(n,k) = T(n,n-k).

A090171 Triangle read by rows, related to Pascal's triangle read mod 2, starting with 0, 1, 0.

Original entry on oeis.org

0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0
Offset: 0

Views

Author

N. J. A. Sloane, Jan 19 2004

Keywords

Examples

			Triangle begins:
0
1 0
1 1 0
0 1 0 0
1 1 1 1 0
...
		

Crossrefs

Cf. A090172, A090173, A090174, A091533, A091562, A205575 (same recurrence).
a(n, k) = A090174(n-1, k), k

Formula

T(n, k) = T(n-1, k) + T(n-1, k-1) + T(n-2, k) + T(n-2, k-1) + T(n-2, k-2) for n >= 2, k >= 0, with initial conditions specified by first two rows.

Extensions

Edited and extended by Christian G. Bower, Jan 20 2004

A091562 Triangle read by rows, related to Pascal's triangle, starting with 1, 0, 0.

Original entry on oeis.org

1, 0, 0, 1, 1, 1, 1, 2, 2, 1, 2, 5, 7, 5, 2, 3, 10, 17, 17, 10, 3, 5, 20, 41, 51, 41, 20, 5, 8, 38, 91, 136, 136, 91, 38, 8, 13, 71, 195, 339, 405, 339, 195, 71, 13, 21, 130, 403, 799, 1107, 1107, 799, 403, 130, 21, 34, 235, 812, 1807, 2845, 3297, 2845, 1807, 812, 235, 34
Offset: 0

Author

Christian G. Bower, Jan 20 2004

Keywords

Examples

			Triangle begins:
  1;
  0,0;
  1,1,1;
  1,2,2,1;
  2,5,7,5,2;
  ...
		

Crossrefs

Row sums: A054878, column 0: A000045(n-1), column 1: A001629.
Cf. A090171, A090172, A090173, A090174, A091533, A205575 (same recurrence).
Cf. A090172.

Formula

T(n, k) = T(n-1, k) + T(n-1, k-1) + T(n-2, k) + T(n-2, k-1) + T(n-2, k-2) for n >= 2, k >= 0, with initial conditions specified by first two rows.
G.f.: A(x, y) = (1-x-x*y)/(1-x-x*y-x^2-x^2*y-x^2*y^2).

A090173 Triangle read by rows, related to Pascal's triangle read mod 2, starting with 0, 0, 1.

Original entry on oeis.org

0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1
Offset: 0

Author

N. J. A. Sloane, Jan 19 2004

Keywords

Examples

			Triangle begins
  0;
  0,1;
  0,1,1;
  0,0,1,0;
  0,1,1,1,1;
  ...
		

Crossrefs

Cf. A090171, A090172, A090174, A091533, A091562, A205575 (same recurrence).
a(n, k) = A090174(n-1, k-1), k>0, 0 otherwise.

Formula

T(n, k) = T(n-1, k) + T(n-1, k-1) + T(n-2, k) + T(n-2, k-1) + T(n-2, k-2) for n >= 2, k >= 0, with initial conditions specified by first two rows.

Extensions

Edited and extended by Christian G. Bower, Jan 20 2004

A205575 Triangle read by rows, related to Pascal's triangle, starting with rows 1; 1,0.

Original entry on oeis.org

1, 1, 0, 2, 2, 1, 3, 5, 4, 1, 5, 12, 14, 8, 2, 8, 25, 38, 32, 15, 3, 13, 50, 94, 104, 71, 28, 5, 21, 96, 215, 293, 260, 149, 51, 8, 34, 180, 468, 756, 822, 612, 304, 92, 13, 55, 331, 980, 1828, 2346, 2136, 1376, 604, 164, 21
Offset: 0

Author

Philippe Deléham, Jan 29 2012

Keywords

Comments

Antidiagonal sums are in A052980, row sums are in A046717.
Similar to A091533 and to A091562. Triangle satisfying the same recurrence as A091533 and A091562, but with the initial values T(0,0) = 1, T(0,1) = 1, T(1,1) = 0.

Examples

			Triangle begins :
1
1, 0
2, 2, 1
3, 5, 4, 1
5, 12, 14, 8, 2
8, 25, 38, 32, 15, 3
13, 50, 94, 104, 71, 28, 5
		

Crossrefs

Cf. Column 0: A000045, Diagonals : A000045, A029907, A036681.
Cf. A090171, A090172, A090173, A090174, A091533, A091562 (same recurrence).

Programs

  • PARI
    T(n,k) = {if(n<0, return(0)); if (n==0, if (k<0, return(0)); if (k==0, return(1))); if (n==1, if (k<0, return(0)); if (k==0, return(1)); if (k==1, return(0))); T(n-1,k)+T(n-1,k-1)+T(n-2,k)+T(n-2,k-1)+T(n-2,k-2);} \\ Michel Marcus, Oct 27 2021

Formula

T(n,k) = T(n-1,k) + T(n-1,k-1) + T(n-2,k) + T(n-2,k-1) + T(n-2,k-2) for n>=2, k>=0, with initial conditions specified by first two rows. T(0,0) = 1, T(1,0) = 1, T(1,1) = 0.

Extensions

a(46), a(48) corrected by Georg Fischer, Oct 27 2021

A212338 Sequence of coefficients of x in marked mesh pattern generating function Q_{n,132}^(0,0,2,0)(x).

Original entry on oeis.org

2, 7, 21, 53, 124, 273, 577, 1181, 2358, 4614, 8880, 16854, 31612, 58691, 108003, 197203, 357596, 644463, 1155059, 2059897, 3656988, 6465660, 11388480, 19990140, 34976870, 61019071, 106160481, 184228193, 318948124, 550962717, 949781269, 1634103701, 2806342578
Offset: 3

Author

N. J. A. Sloane, May 09 2012

Keywords

Comments

Apparently the number of Dyck n-paths that have n-2 peaks after changing each valley to a peak by the transformation DU -> UD. E.g., the Dyck 3-paths UUUDDD and UUDUDD have 1 peak after changing DU to UD so a(3) = 2. - David Scambler, Sep 03 2012

Crossrefs

Cf. Column 2 of A091533. Partial sums of A036681.

Programs

Formula

g.f. -x^3*(2+x) / (x^2+x-1)^3, i.e., a(n) = 2*A001628(n-3) + A001628(n-4). - R. J. Mathar, Jun 27 2012
a(n) = a(n-1) + a(n-2) + A067331(n-3). E.g., a(5) = 21 = 7 + 2 + 12. - David Scambler, Sep 03 2012

A228815 Symmetric triangle, read by rows, related to Fibonacci numbers.

Original entry on oeis.org

0, 1, 1, 1, 2, 1, 2, 5, 5, 2, 3, 10, 14, 10, 3, 5, 20, 36, 36, 20, 5, 8, 38, 83, 106, 83, 38, 8, 13, 71, 182, 281, 281, 182, 71, 13, 21, 130, 382, 690, 834, 690, 382, 130, 21, 34, 235, 778, 1606, 2268, 2268, 1606, 778, 235, 34, 55, 420, 1546, 3586, 5780, 6750
Offset: 0

Author

Philippe Deléham, Oct 30 2013

Keywords

Comments

Triangles satisfying the same recurrence: A091533, A091562, A185081, A205575, A209137, A209138.

Examples

			Triangle begins :
0
1, 1
1, 2, 1
2, 5, 5, 2
3, 10, 14, 10, 3
5, 20, 36, 36, 20, 5
8, 38, 83, 106, 83, 38, 8
13, 71, 182, 281, 281, 182, 71, 13
21, 130, 382, 690, 834, 690, 382, 130, 21
34, 235, 778, 1606, 2268, 2268, 1606, 778, 235, 34
55, 420, 1546, 3586, 5780, 6750, 5780, 3586, 1546, 420, 55
		

Crossrefs

Cf. A000045 (1st column), A001629 (2nd column), A008998, A152011, A261055 (3rd column).

Formula

G.f.: x*(1+y)/(1-x-x*y-x^2-x^2*y-x^2*y^2).
T(n,k) = T(n-1,k) + T(n-1,k-1) + T(n-2,k) + T(n-2,k-1) + T(n-2,k-2), T(0,0) = 0, T(1,0) = T(1,1) = 1, T(n,k) = 0 if k<0 or if k>n.
Sum_{k = 0..n} T(n,k)*x^k = A000045(n), 2*A015518(n), 3*A015524(n), 4*A200069(n) for x = 0, 1, 2, 3 respectively.
Sum_{k = 0..floor(n/2)} T(n-k,k) = A008998(n+1).
Showing 1-10 of 10 results.