A133566 Triangle read by rows: (1,1,1,...) on the main diagonal and (0,1,0,1,...) on the subdiagonal.
1, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
Offset: 1
Examples
First few rows of the triangle: 1; 0, 1; 0, 1, 1; 0, 0, 0, 1; 0, 0, 0, 1, 1; 0, 0, 0, 0, 0, 1; ...
Programs
-
Maple
A133566 := proc(n,k) if n = k then 1; elif k=n-1 and type(n,odd) then 1; else 0 ; end if; end proc: # R. J. Mathar, Jun 20 2015
-
Mathematica
T[n_, k_] := Which[n == k, 1, k == n - 1 && OddQ[n], 1, True, 0]; Table[T[n, k], {n, 1, 14}, {k, 1, n}] // Flatten (* Jean-François Alcover, Aug 24 2023 *)
Formula
Odd rows: (n-2) zeros followed by 1, 1. Even rows: (n-1) zeros followed by 1.
Sum_{k=0..n} T(n,k) = A040001(n). - Philippe Deléham, Dec 15 2007
G.f.: (-1-x*y-x^2*y)*x*y/((-1+x*y)*(1+x*y)). - R. J. Mathar, Aug 11 2015
Extensions
Entry revised by N. J. A. Sloane, Jun 20 2015
Comments