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.

A139821 Triangle T(i,j) read by rows: T(i,1) = Fibonacci(i) for all i; T(i,i) = i for all i; T(i,j) = T(i-1,j) + T(i-2,j) + T(i-1,j-1) - T(i-2,j-1).

Original entry on oeis.org

1, 1, 2, 2, 2, 3, 3, 5, 3, 4, 5, 8, 9, 4, 5, 8, 15, 15, 14, 5, 6, 13, 26, 31, 24, 20, 6, 7, 21, 46, 57, 54, 35, 27, 7, 8, 34, 80, 108, 104, 85, 48, 35, 8, 9, 55, 139, 199, 209, 170, 125, 63, 44, 9, 10, 89, 240, 366, 404, 360, 258, 175, 80, 54, 10, 11
Offset: 1

Views

Author

Gary W. Adamson, May 01 2008

Keywords

Comments

Sum of n-th row terms = (2^n - 1) (see solution in Fibonacci Quarterly).

Examples

			First few rows of the triangle are:
1;
1, 2;
2, 2, 3;
3, 5, 3, 4;
5, 8, 9, 4, 5;
8, 15, 15, 14, 5, 6;
13, 26, 31, 24, 20, 6, 7;
21, 46, 57, 54, 5, 27, 7, 8;
...
		

Programs

  • PARI
    t(i, j) = {if ((i <= 0) || (j <= 0), 0, if (j == 1, fibonacci(i), if (i == j, i, t(i-1,j) + t(i-2,j) + t(i-1,j-1) - t(i-2,j-1););););}
    tabl(nn) = {for (n=1, nn, for (k=1, n, print1(t(n, k), ", ");););} \\ Michel Marcus, Feb 11 2014

Extensions

More terms from Michel Marcus, Feb 11 2014