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.

A137682 Left border of triangle A137680.

Original entry on oeis.org

1, 1, 3, 7, 17, 40, 96, 228, 544, 1296, 3089, 7361, 17544, 41810, 99643, 237471, 565946, 1348773, 3214424, 7660679, 18257085, 43510652, 103695461, 247129108, 588963062, 1403628615, 3345155947, 7972242937, 18999609718, 45280252031
Offset: 1

Views

Author

Gary W. Adamson, Feb 05 2008

Keywords

Comments

Each term in the sequence (n > 1) = sum of previous terms of triangle A137680 = partial sums of sequence A137681: (1, 2, 4, 10, 23, ...).
Starting (1, 3, 7, ...) = INVERT transform of A160096. - Gary W. Adamson, May 01 2009

Examples

			First few rows of triangle A137680 =
  1;
  1, 1;
  3, 0, 1;
  7, 2, 0, 1;
  ...
a(5) = 17 is the sum of 1 through 4 row terms of triangle A137680: (1 + 2 + 4 + 10); where (1, 2, 4, 10, 23, ...) = A137681 = row sums of triangle A137680 = first difference row of A137682, n > 1.
		

Crossrefs

Programs

  • Maple
    A137682 := proc(n)
        A137680(n,1) ;
    end proc:
    seq(A137682(n),n=1..30) ; # R. J. Mathar, Aug 12 2012
  • Mathematica
    T[n_, k_] := T[n, k] = Which[k < 1 || k > n, 0, n == 1, 1, k == 1, Sum[T[r, j], {r, 1, n-1}, {j, 1, r}], True, T[n-1, k-1] - T[n-k, k-1]];
    a[n_] := T[n, 1];
    Table[a[n], {n, 1, 30}] (* Jean-François Alcover, Sep 19 2024, after R. J. Mathar in A137680 *)

Formula

Partial sums of sequence A137681 prefaced with a 1. a(n) is the sum of all terms in rows 1 through (n-1) in triangle A137680.

A137680 Triangle read by rows, T(n,k) = T(n-1, k-1) - T(n-k, k-1); with leftmost term in each row = sum of all previous terms.

Original entry on oeis.org

1, 1, 1, 3, 0, 1, 7, 2, 0, 1, 17, 4, 1, 0, 1, 40, 10, 4, 1, 0, 1, 96, 23, 8, 3, 1, 0, 1, 228, 56, 19, 8, 3, 1, 0, 1, 544, 132, 46, 18, 7, 3, 1, 0, 1, 1296, 316, 109, 42, 18, 7, 3, 1, 0, 1, 3089, 752, 260, 101, 41, 17, 7, 3, 1, 0, 1, 7361, 1793, 620, 241, 98, 41, 17, 7, 3, 1, 0, 1, 17544, 4272, 1477, 574, 233, 97, 40, 17, 7, 3, 1, 0, 1
Offset: 1

Views

Author

Gary W. Adamson, Feb 05 2008

Keywords

Comments

A variation of the same sequence = column 2 of the triangle: (1, 0, 2, 4, 10, 23, 56, 132, ...) = first difference row of column 1. Left border of the triangle = A137682.
Left column starting (1, 3, ...) = INVERT transform of A160096. - Gary W. Adamson, May 01 2009

Examples

			First few rows of the triangle:
     1;
     1,   1;
     3,   0,   1;
     7,   2,   0,   1;
    17,   4,   1,   0,  1;
    40,  10,   4,   1,  0,  1;
    96,  23,   8,   3,  1,  0, 1;
   228,  56,  19,   8,  3,  1, 0, 1;
   544, 132,  46,  18,  7,  3, 1, 0, 1;
  1296, 316, 109,  42, 18,  7, 3, 1, 0, 1;
  3089, 752, 260, 101, 41, 17, 7, 3, 1, 0, 1;
  ...
		

Crossrefs

Cf. A137681 (row sums), A137682.
Cf. A160096. - Gary W. Adamson, May 01 2009

Programs

  • Maple
    A137680 := proc(n,k)
        if k < 1 or k > n then
            0 ;
        elif n = 1 then
            1;
        elif k = 1 then
            add(add(procname(r,j),j=1..r),r=1..n-1) ;
        else
            procname(n-1,k-1)-procname(n-k,k-1) ;
        end if;
    end proc: # R. J. Mathar, Aug 12 2012
  • Mathematica
    T[n_, k_] := T[n, k] = Which[k < 1 || k > n, 0, n == 1, 1, k == 1, Sum[T[r, j], {r, 1, n-1}, {j, 1, r}], True, T[n-1, k-1] - T[n-k, k-1]];
    Table[T[n, k], {n, 1, 13}, {k, 1, n}] // Flatten (* Jean-François Alcover, Apr 02 2024, after R. J. Mathar *)
Showing 1-2 of 2 results.