A129686 Triangle read by rows: row n is 0^(n-3), 1, 0, 1.
1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1
Offset: 1
Examples
First few rows of the triangle: 1; 0, 1; 1, 0, 1; 0, 1, 0, 1 0, 0, 1, 0, 1; 0, 0, 0, 1, 0, 1; ...
Programs
-
Mathematica
T[n_, k_] := If[k == n || k == n-2, 1, 0]; Table[T[n, k], {n, 1, 12}, {k, 1, n}] // Flatten (* Jean-François Alcover, Jul 10 2019 *)
-
PARI
tabl(nn) = {t129686 = matrix(nn, nn, n, k, (k<=n)*((k==n) || (k==(n-2)))); for (n = 1, nn, for (k = 1, n, print1(t129686[n, k], ", ");););} \\ Michel Marcus, Feb 12 2014
Formula
As an infinite lower triangular matrix, (1,1,1,...) in the main diagonal, (0,0,0,...) in the subdiagonal and (1,1,1,...) in the subsubdiagonal; with the rest zeros. (1, 0, 1, 0, 0, 0, ...) in every column.
Extensions
More terms from Michel Marcus, Feb 12 2014
Comments