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.

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