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.

A117918 Difference row triangle of the Pell sequence.

Original entry on oeis.org

1, 1, 2, 2, 3, 5, 2, 4, 7, 12, 4, 6, 10, 17, 29, 4, 8, 14, 24, 41, 70, 8, 12, 20, 34, 58, 99, 169, 8, 16, 28, 48, 82, 140, 239, 408, 16, 24, 40, 68, 116, 198, 338, 577, 985, 16, 32, 56, 96, 164, 280, 478, 816, 1393, 2378, 32, 48, 80, 136, 232, 396, 676, 1154, 1970, 3363, 5741
Offset: 1

Views

Author

Gary W. Adamson, Apr 02 2006

Keywords

Examples

			First few rows of the triangle are:
  1;
  1,  2;
  2,  3,  5;
  2,  4,  7, 12;
  4,  6, 10, 17, 29;
  4,  8, 14, 24, 41, 70;
  8, 12, 20, 34, 58, 99, 169;
  ...
		

References

  • Raymond Lebois, "Le théorème de Pythagore et ses implications", p. 123, Editions PIM, (1979).

Crossrefs

Column 1 is A016116(n-1).
Diagonals include A000129, A001333, A052542, A002203, A371596.

Programs

  • Magma
    Pell:= func< n | Round(((1+Sqrt(2))^n -(1-Sqrt(2))^n)/(2*Sqrt(2))) >;
    T:= func< n,k | (&+[ (-1)^j*Binomial(n-k,j)*Pell(n-j): j in [0..n-k]]) >;
    [T(n,k): k in [1..n], n in [1..12]]; // G. C. Greubel, Oct 23 2021
    
  • Mathematica
    T[n_, k_]:= T[n, k]= If[k==1, 2^Floor[(n-1)/2], T[n, k-1] + T[n-1, k-1]];
    Table[T[n, k], {n,12}, {k,n}]//Flatten (* G. C. Greubel, Oct 22 2021 *)
  • Sage
    def A117918(n,k): return sum( (-1)^j*binomial(n-k, j)*lucas_number1(n-j, 2,-1) for j in (0..n) )
    flatten([[A117918(n,k) for k in (1..n)] for n in (1..12)]) # G. C. Greubel, Oct 23 2021

Formula

Difference rows of the Pell sequence A000129 starting (1, 2, 5, 12, ...) become the diagonals of the triangle.
T(n, n) = A000129(n).
T(n, n-1) = A000129(n) - A000129(n-1).
From G. C. Greubel, Oct 23 2021: (Start)
T(n, k) = T(n, k-1) + T(n-1, k-1) with T(n, 1) = 2^floor((n-1)/2).
T(n, k) = Sum_{j=0..n-k} (-1)^j*binomial(n-k, j)*Pell(n-j), where Pell(n) = A000129(n).
Sum_{k=1..n} T(n, k) = Pell(n+1) -2^floor(n/2)*((1 + (-1)^n)/2) - 2^floor((n - 1)/2)*((1 - (-1)^n)/2). (End)