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

A222405 Triangle read by rows: left and right edges are A002061 (1,3,7,13,21,...), interior entries are filled in using the Pascal triangle rule.

Original entry on oeis.org

1, 3, 3, 7, 6, 7, 13, 13, 13, 13, 21, 26, 26, 26, 21, 31, 47, 52, 52, 47, 31, 43, 78, 99, 104, 99, 78, 43, 57, 121, 177, 203, 203, 177, 121, 57, 73, 178, 298, 380, 406, 380, 298, 178, 73, 91, 251, 476, 678, 786, 786, 678, 476, 251, 91, 111, 342, 727, 1154, 1464, 1572, 1464, 1154, 727, 342, 111
Offset: 0

Views

Author

N. J. A. Sloane, Feb 18 2013

Keywords

Examples

			Triangle begins:
1
3, 3
7, 6, 7
13, 13, 13, 13
21, 26, 26, 26, 21
31, 47, 52, 52, 47, 31
43, 78, 99, 104, 99, 78, 43
57, 121, 177, 203, 203, 177, 121, 57
73, 178, 298, 380, 406, 380, 298, 178, 73
...
		

Crossrefs

Row sums are A027178.

Programs

  • Maple
    d:=[seq(n*(n+1)+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^2+n+1; t[n_, 0] := n^2+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 14 2014 *)

A027180 a(n) = Sum_{0<=j<=i<=n} A027170(i, j).

Original entry on oeis.org

1, 7, 27, 79, 199, 459, 1003, 2119, 4383, 8947, 18115, 36495, 73303, 146971, 294363, 589207, 1178959, 2358531, 4717747, 9436255, 18873351, 37747627, 75496267, 150993639, 301988479, 603978259, 1207957923, 2415917359, 4831836343, 9663674427, 19327350715
Offset: 0

Views

Author

Keywords

Crossrefs

Partial sums of A027178.

Programs

  • Mathematica
    LinearRecurrence[{5,-9,7,-2},{1,7,27,79},50] (* Harvey P. Dale, Jul 08 2019 *)
  • PARI
    Vec((1+x)^2/((1-x)^3*(1-2*x)) + O(x^40)) \\ Colin Barker, Feb 20 2016

Formula

a(n) = 18*2^n - 2*n^2 - 10*n - 17.
From Colin Barker, Feb 20 2016: (Start)
a(n) = 5*a(n-1)-9*a(n-2)+7*a(n-3)-2*a(n-4) for n>3.
G.f.: (1+x)^2 / ((1-x)^3*(1-2*x)).
(End)
Showing 1-2 of 2 results.