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.

A176481 Triangle, read by rows, defined by T(n, k) = b(n) - b(k) - b(n-k) + 2, where b(n) = A001333(n).

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 1, 5, 5, 1, 1, 11, 13, 11, 1, 1, 25, 33, 33, 25, 1, 1, 59, 81, 87, 81, 59, 1, 1, 141, 197, 217, 217, 197, 141, 1, 1, 339, 477, 531, 545, 531, 477, 339, 1, 1, 817, 1153, 1289, 1337, 1337, 1289, 1153, 817, 1, 1, 1971, 2785, 3119, 3249, 3283, 3249, 3119, 2785, 1971, 1
Offset: 0

Views

Author

Roger L. Bagula, Apr 18 2010

Keywords

Comments

Row sums are: {1, 2, 5, 12, 37, 118, 369, 1112, 3241, 9194, 25533, ...}.

Examples

			Triangle begins as:
  1;
  1,    1;
  1,    3,    1;
  1,    5,    5,    1;
  1,   11,   13,   11,    1;
  1,   25,   33,   33,   25,    1;
  1,   59,   81,   87,   81,   59,    1;
  1,  141,  197,  217,  217,  197,  141,    1;
  1,  339,  477,  531,  545,  531,  477,  339,    1;
  1,  817, 1153, 1289, 1337, 1337, 1289, 1153,  817,    1;
  1, 1971, 2785, 3119, 3249, 3283, 3249, 3119, 2785, 1971, 1;
		

Crossrefs

Cf. A001333.

Programs

  • Magma
    b:= func< n| Round(((1+Sqrt(2))^n + (1-Sqrt(2))^n)/2) >; [[b(n)-b(k)-b(n-k)+2: k in [0..n]]: n in [0..10]]; // G. C. Greubel, May 06 2019
    
  • Mathematica
    b[n_]:= LucasL[n, 2]/2; T[n_, k_]:= b[n] -b[k] -b[n-k] +2;
    Table[T[n, k], {n,0,12}, {k,0,n}]//Flatten (* modified by G. C. Greubel, May 06 2019 *)
  • PARI
    {b(n) = round(((1+sqrt(2))^n + (1-sqrt(2))^n)/2)};
    {T(n,k) = b(n) -b(k) -b(n-k) +2};
    for(n=0,10, for(k=0,n, print1(T(n,k), ", "))) \\ G. C. Greubel, May 06 2019
    
  • Sage
    def b(m): return lucas_number2(m,2,-1)/2
    def T(n, k): return b(n) - b(k) - b(n-k) + 2
    [[T(n, k) for k in (0..n)] for n in (0..12)] # G. C. Greubel, May 06 2019

Formula

Let b(n) = ((1+sqrt(2))^n + (1-sqrt(2))^n)/2 = A001333(n), then T(n, k) = b(n) - b(k) - b(n-k) + 2.

Extensions

Edited by G. C. Greubel, May 06 2019