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.

A046937 Triangle read by rows. Same rule as Aitken triangle (A011971) except T(0,0) = 1, T(1,0) = 2.

Original entry on oeis.org

1, 2, 3, 3, 5, 8, 8, 11, 16, 24, 24, 32, 43, 59, 83, 83, 107, 139, 182, 241, 324, 324, 407, 514, 653, 835, 1076, 1400, 1400, 1724, 2131, 2645, 3298, 4133, 5209, 6609, 6609, 8009, 9733, 11864, 14509, 17807, 21940, 27149, 33758
Offset: 0

Views

Author

Keywords

Examples

			Triangle starts:
[0] [   1]
[1] [   2,    3]
[2] [   3,    5,    8]
[3] [   8,   11,   16,    24]
[4] [  24,   32,   43,    59,    83]
[5] [  83,  107,  139,   182,   241,   324]
[6] [ 324,  407,  514,   653,   835,  1076,  1400]
[7] [1400, 1724, 2131,  2645,  3298,  4133,  5209,  6609]
[8] [6609, 8009, 9733, 11864, 14509, 17807, 21940, 27149, 33758]
		

Crossrefs

Borders give A038561.
Cf. A011971.

Programs

  • Haskell
    a046937 n k = a046937_tabl !! n !! k
    a046937_row n = a046937_tabl !! n
    a046937_tabl = [1] : iterate (\row -> scanl (+) (last row) row) [2,3]
    -- Reinhard Zumkeller, Jan 13 2013
  • Maple
    # Compare the analogue algorithm for the Catalan triangle in A350584.
    A046937Triangle := proc(len) local A, P, T, n; A := [2]; P := [1]; T := [[1]];
    for n from 1 to len-1 do P := ListTools:-PartialSums([A[-1], op(P)]);
    A := P; T := [op(T), P] od; T end:
    A046937Triangle(9): ListTools:-Flatten(%); # Peter Luschny, Mar 27 2022
  • Mathematica
    a[0, 0] = 1; a[1, 0] = 2; a[n_, 0] := a[n-1, n-1]; a[n_, k_] := a[n, k] = a[n, k-1] + a[n-1, k-1]; Table[a[n, k], {n, 0, 9}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jun 06 2013 *)