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

A222403 Triangle read by rows: left and right edges are A000217, interior entries are filled in using the Pascal triangle rule.

Original entry on oeis.org

0, 1, 1, 3, 2, 3, 6, 5, 5, 6, 10, 11, 10, 11, 10, 15, 21, 21, 21, 21, 15, 21, 36, 42, 42, 42, 36, 21, 28, 57, 78, 84, 84, 78, 57, 28, 36, 85, 135, 162, 168, 162, 135, 85, 36, 45, 121, 220, 297, 330, 330, 297, 220, 121, 45, 55, 166, 341, 517, 627, 660, 627, 517, 341, 166, 55
Offset: 0

Views

Author

N. J. A. Sloane, Feb 18 2013

Keywords

Comments

In general, if the sequence defining the left and right edges is [a_0, a_1, ...], the row sums [s_0, s_1, ...] are given by s_0=a_0 and, for n>0,
s_n = 2a_n + Sum_{i=1..n-1} 2^(n-i) a_i.
Conversely, given the rows sums [s_0, s_1, ...], the edge sequence is [a_0, a_1, ...] where a_0=s_0 and, for n>0, a_n = (s_n - Sum_{i=1..n-1} s_i)/2.

Examples

			Triangle begins:
0
1, 1
3, 2, 3
6, 5, 5, 6
10, 11, 10, 11, 10
15, 21, 21, 21, 21, 15
21, 36, 42, 42, 42, 36, 21
28, 57, 78, 84, 84, 78, 57, 28
...
		

Crossrefs

Other triangles of this type: A007318, A051666, A134634, A222404, A222405.
Cf. A000217.
Row sums are A005803.

Programs

  • Maple
    d:=[seq(n*(n+1)/2,n=0..14)];
    f:=proc(d) local T,M,n,i;
    M:=nops(d);
    T:=Array(0..M-1,0..M-1);
    for n from 0 to M-1 do T[n,0]:=d[n+1]; T[n,n]:=d[n+1]; od:
    for n from 2 to M-1 do
    for i from 1 to n-1 do T[n,i]:=T[n-1,i-1]+T[n-1,i]; od: od:
    lprint("triangle:");
    for n from 0 to M-1 do lprint(seq(T[n,i],i=0..n)); od:
    lprint("row sums:");
    lprint([seq( add(T[i,j],j=0..i), i=0..M-1)]);
    end;
    f(d);
  • Mathematica
    t[n_, n_] := n*(n+1)/2; t[n_, 0] := n*(n+1)/2; t[n_, k_] := t[n, k] = t[n-1, k-1] + t[n-1, k]; Table[t[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jan 20 2014 *)

Formula

G.f. as triangle: (1+x-4*x*y+x*y^2+x^2*y^2)*y/((1-y)^2*(-x*y+1)^2*(-x*y-y+1)). - Robert Israel, Apr 04 2018

A222404 Triangle read by rows: left and right edges are A002378, interior entries are filled in using the Pascal triangle rule.

Original entry on oeis.org

0, 2, 2, 6, 4, 6, 12, 10, 10, 12, 20, 22, 20, 22, 20, 30, 42, 42, 42, 42, 30, 42, 72, 84, 84, 84, 72, 42, 56, 114, 156, 168, 168, 156, 114, 56, 72, 170, 270, 324, 336, 324, 270, 170, 72, 90, 242, 440, 594, 660, 660, 594, 440, 242, 90, 110, 332, 682, 1034, 1254, 1320, 1254, 1034, 682, 332, 110
Offset: 0

Views

Author

N. J. A. Sloane, Feb 18 2013

Keywords

Examples

			Triangle begins:
0
2, 2
6, 4, 6
12, 10, 10, 12
20, 22, 20, 22, 20
30, 42, 42, 42, 42, 30
42, 72, 84, 84, 84, 72, 42
56, 114, 156, 168, 168, 156, 114, 56
...
		

Crossrefs

Row sums are 4*A000295.

Programs

  • Maple
    d:=[seq(n*(n+1),n=0..14)];
    f:=proc(d) local T,M,n,i;
    M:=nops(d);
    T:=Array(0..M-1,0..M-1);
    for n from 0 to M-1 do T[n,0]:=d[n+1]; T[n,n]:=d[n+1]; od:
    for n from 2 to M-1 do
    for i from 1 to n-1 do T[n,i]:=T[n-1,i-1]+T[n-1,i]; od: od:
    lprint("triangle:");
    for n from 0 to M-1 do lprint(seq(T[n,i],i=0..n)); od:
    lprint("row sums:");
    lprint([seq( add(T[i,j],j=0..i), i=0..M-1)]);
    end;
    f(d);
  • Mathematica
    t[n_, n_] := n*(n+1); t[n_, 0] := n*(n+1); t[n_, k_] := t[n, k] = t[n-1, k-1] + t[n-1, k]; Table[t[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jan 20 2014 *)

A027178 a(n) = T(n,0) + T(n,1) + ... + T(n,n), T given by A027170.

Original entry on oeis.org

1, 6, 20, 52, 120, 260, 544, 1116, 2264, 4564, 9168, 18380, 36808, 73668, 147392, 294844, 589752, 1179572, 2359216, 4718508, 9437096, 18874276, 37748640, 75497372, 150994840, 301989780, 603979664, 1207959436, 2415918984
Offset: 0

Views

Author

Keywords

Comments

Define a triangle U(n,k) with U(n,0) = n*(n+1) + 1 for n>=0 and U(r,c) = U(r-1,c-1) + U(r-1,c). The sum of the terms in row n is a(n). The first rows are 1; 3, 3; 7, 6, 7; 13, 13, 13, 13; 21, 26, 26, 26, 21; row sums are 1, 6, 20, 52, 120. - J. M. Bergot, Feb 15 2013
This triangle is now A222405. - N. J. A. Sloane, Feb 18 2013

Crossrefs

Cf. A222405.

Formula

a(n) = 9*2^n - 4n - 8 (conjectured). - Ralf Stephan, Feb 13 2004
Conjectures from Colin Barker, Feb 17 2016: (Start)
a(n) = 4*a(n-1)-5*a(n-2)+2*a(n-3) for n>2.
G.f.: (1+x)^2 / ((1-x)^2*(1-2*x)).
(End)

A134634 Triangle formed by Pascal's rule with borders = A000108.

Original entry on oeis.org

1, 1, 1, 2, 2, 2, 5, 4, 4, 5, 14, 9, 8, 9, 14, 42, 23, 17, 17, 23, 42, 132, 65, 40, 34, 40, 65, 132, 429, 197, 105, 74, 74, 105, 197, 429, 1430, 626, 302, 179, 148, 179, 302, 626, 1430, 4862, 2056, 928, 481, 327, 327, 481, 928, 2056, 4862, 16796, 6918, 2984, 1409, 808, 654, 808, 1409, 2984, 6918, 16796, 58786, 23714, 9902, 4393, 2217, 1462, 1462, 2217, 4393, 9902, 23714, 58786
Offset: 0

Views

Author

Gary W. Adamson, Nov 04 2007

Keywords

Comments

Row sums = A134635: (1, 2, 6, 18, 54, 164, ...).

Examples

			First few rows of the triangle:
    1;
    1,  1;
    2,  2,  2;
    5,  4,  4,  5;
   14,  9,  8,  9, 14;
   42, 23, 17, 17, 23, 42;
  132, 65, 40, 34, 40, 65, 132;
  ...
		

Crossrefs

Formula

Triangle, given right and left borders consist of the Catalan sequence, A000108; then T(n,k) = T(n-1,k) + T(n-1,k-1).

Extensions

Recomputed by N. J. A. Sloane, Feb 18 2013
Showing 1-4 of 4 results.