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.

A136157 Triangle by columns, (3, 1, 0, 0, 0, ...) in every column.

This page as a plain text file.
%I A136157 #22 Dec 26 2023 23:47:48
%S A136157 3,1,3,0,1,3,0,0,1,3,0,0,0,1,3,0,0,0,0,1,3,0,0,0,0,0,1,3,0,0,0,0,0,0,
%T A136157 1,3,0,0,0,0,0,0,0,1,3,0,0,0,0,0,0,0,0,1,3,0,0,0,0,0,0,0,0,0,1,3,0,0,
%U A136157 0,0,0,0,0,0,0,0,1,3
%N A136157 Triangle by columns, (3, 1, 0, 0, 0, ...) in every column.
%C A136157 Infinite lower triangular matrix with (3, 3, 3, ...) in the main diagonal and (1, 1, 1, ...) in the subdiagonal, with the rest zeros.
%H A136157 G. C. Greubel, <a href="/A136157/b136157.txt">Rows n = 0..50 of the triangle, flattened</a>
%F A136157 From _G. C. Greubel_, Dec 26 2023: (Start)
%F A136157 T(n, k) = 3 if k = n, T(n, k) = 1 if k = n-1, otherwise T(n, k) = 0.
%F A136157 T(n, k) = 2 + (-1)^(n+k) for k >= n-1, otherwise T(n, k) = 0.
%F A136157 Sum_{k=0..n} T(n, k) = 4 - [n=0].
%F A136157 Sum_{k=0..n} (-1)^k*T(n, k) = (-2)^n + [n=0].
%F A136157 Sum_{k=0..floor(n/2)} T(n-k, k) = 2 + (-1)^n.
%F A136157 Sum_{k=0..floor(n/2)} (-1)^k*T(n-k, k) = (2 + (-1)^n)*(-1)^floor(n/2). (End)
%e A136157 First few rows of the triangle:
%e A136157   3;
%e A136157   1, 3;
%e A136157   0, 1, 3;
%e A136157   0, 0, 1, 3;
%e A136157   0, 0, 0, 1, 3;
%e A136157   0, 0, 0, 0, 1, 3;
%e A136157   ...
%t A136157 Table[PadLeft[{1,3},n,{0}],{n,0,20}]//Flatten (* _Harvey P. Dale_, Apr 04 2018 *)
%o A136157 (Magma)
%o A136157 function T(n,k) // T = A136157
%o A136157   if k gt n-2 then return 2 + (-1)^(n+k);
%o A136157   else return 0;
%o A136157   end if;
%o A136157 end function;
%o A136157 [T(n,k): k in [0..n], n in [0..12]]; // _G. C. Greubel_, Dec 26 2023
%o A136157 (SageMath)
%o A136157 def T(n,k): # T = A136157
%o A136157     if k>n-2: return 2 + (-1)^(n+k)
%o A136157     else: return 0
%o A136157 flatten([[T(n,k) for k in range(n+1)] for n in range(13)]) # _G. C. Greubel_, Dec 26 2023
%Y A136157 Cf. A136158.
%K A136157 nonn,tabl
%O A136157 0,1
%A A136157 _Gary W. Adamson_, Dec 16 2007
%E A136157 Offset changed by _G. C. Greubel_, Dec 26 2023