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.

This page as a plain text file.
%I A117918 #23 Feb 24 2025 16:32:16
%S A117918 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,
%T A117918 169,8,16,28,48,82,140,239,408,16,24,40,68,116,198,338,577,985,16,32,
%U A117918 56,96,164,280,478,816,1393,2378,32,48,80,136,232,396,676,1154,1970,3363,5741
%N A117918 Difference row triangle of the Pell sequence.
%D A117918 Raymond Lebois, "Le théorème de Pythagore et ses implications", p. 123, Editions PIM, (1979).
%H A117918 G. C. Greubel, <a href="/A117918/b117918.txt">Rows n = 1..50 of the triangle, flattened</a>
%F A117918 Difference rows of the Pell sequence A000129 starting (1, 2, 5, 12, ...) become the diagonals of the triangle.
%F A117918 T(n, n) = A000129(n).
%F A117918 T(n, n-1) = A000129(n) - A000129(n-1).
%F A117918 From _G. C. Greubel_, Oct 23 2021: (Start)
%F A117918 T(n, k) = T(n, k-1) + T(n-1, k-1) with T(n, 1) = 2^floor((n-1)/2).
%F A117918 T(n, k) = Sum_{j=0..n-k} (-1)^j*binomial(n-k, j)*Pell(n-j), where Pell(n) = A000129(n).
%F A117918 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)
%e A117918 First few rows of the triangle are:
%e A117918   1;
%e A117918   1,  2;
%e A117918   2,  3,  5;
%e A117918   2,  4,  7, 12;
%e A117918   4,  6, 10, 17, 29;
%e A117918   4,  8, 14, 24, 41, 70;
%e A117918   8, 12, 20, 34, 58, 99, 169;
%e A117918   ...
%t A117918 T[n_, k_]:= T[n, k]= If[k==1, 2^Floor[(n-1)/2], T[n, k-1] + T[n-1, k-1]];
%t A117918 Table[T[n, k], {n,12}, {k,n}]//Flatten (* _G. C. Greubel_, Oct 22 2021 *)
%o A117918 (Magma)
%o A117918 Pell:= func< n | Round(((1+Sqrt(2))^n -(1-Sqrt(2))^n)/(2*Sqrt(2))) >;
%o A117918 T:= func< n,k | (&+[ (-1)^j*Binomial(n-k,j)*Pell(n-j): j in [0..n-k]]) >;
%o A117918 [T(n,k): k in [1..n], n in [1..12]]; // _G. C. Greubel_, Oct 23 2021
%o A117918 (Sage)
%o A117918 def A117918(n,k): return sum( (-1)^j*binomial(n-k, j)*lucas_number1(n-j, 2,-1) for j in (0..n) )
%o A117918 flatten([[A117918(n,k) for k in (1..n)] for n in (1..12)]) # _G. C. Greubel_, Oct 23 2021
%Y A117918 Column 1 is A016116(n-1).
%Y A117918 Diagonals include A000129, A001333, A052542, A002203, A371596.
%K A117918 nonn,tabl,easy
%O A117918 1,3
%A A117918 _Gary W. Adamson_, Apr 02 2006