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.

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

This page as a plain text file.
%I A222404 #8 Jan 20 2014 04:34:31
%S A222404 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,
%T A222404 84,72,42,56,114,156,168,168,156,114,56,72,170,270,324,336,324,270,
%U A222404 170,72,90,242,440,594,660,660,594,440,242,90,110,332,682,1034,1254,1320,1254,1034,682,332,110
%N A222404 Triangle read by rows: left and right edges are A002378, interior entries are filled in using the Pascal triangle rule.
%e A222404 Triangle begins:
%e A222404 0
%e A222404 2, 2
%e A222404 6, 4, 6
%e A222404 12, 10, 10, 12
%e A222404 20, 22, 20, 22, 20
%e A222404 30, 42, 42, 42, 42, 30
%e A222404 42, 72, 84, 84, 84, 72, 42
%e A222404 56, 114, 156, 168, 168, 156, 114, 56
%e A222404 ...
%p A222404 d:=[seq(n*(n+1),n=0..14)];
%p A222404 f:=proc(d) local T,M,n,i;
%p A222404 M:=nops(d);
%p A222404 T:=Array(0..M-1,0..M-1);
%p A222404 for n from 0 to M-1 do T[n,0]:=d[n+1]; T[n,n]:=d[n+1]; od:
%p A222404 for n from 2 to M-1 do
%p A222404 for i from 1 to n-1 do T[n,i]:=T[n-1,i-1]+T[n-1,i]; od: od:
%p A222404 lprint("triangle:");
%p A222404 for n from 0 to M-1 do lprint(seq(T[n,i],i=0..n)); od:
%p A222404 lprint("row sums:");
%p A222404 lprint([seq( add(T[i,j],j=0..i), i=0..M-1)]);
%p A222404 end;
%p A222404 f(d);
%t A222404 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 *)
%Y A222404 Cf. A007318, A002378, A222403, A222405.
%Y A222404 Row sums are 4*A000295.
%K A222404 nonn,tabl
%O A222404 0,2
%A A222404 _N. J. A. Sloane_, Feb 18 2013