A135839 Triangle read by rows: starting with A128174, replace left border with (1, 1, 1, ...).
1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1
Offset: 1
Examples
First few rows of the triangle are: 1; 1, 1; 1, 0, 1; 1, 1, 0, 1; 1, 0, 1, 0, 1; 1, 1, 0, 1, 0, 1; 1, 0, 1, 0, 1, 0, 1; ...
Links
- Zhuorui He, Rows 1..150 of the triangle, flattened (first 50 rows from G. C. Greubel)
Programs
-
Mathematica
T[1, 1] := 1; T[n_, 1] := 1; T[n_, n_] := 1; T[n_, k_] := (1 - (-1)^(n - k + 1))/2; Table[T[n, k], {n, 1, 10}, {k, 1, n}]//Flatten (* G. C. Greubel, Dec 05 2016 *) Flatten[Table[Join[{1},PadLeft[{},n,{0,1}]],{n,0,20}]] (* Harvey P. Dale, Feb 26 2024 *)
Formula
Given A128174, replace left border with (1, 1, 1, ...). Triangle read by rows, odd rows = n terms of (1, 0, 1, ...); even rows = n terms of (1, 1, 0, 1, 0, 1, ...). By columns, leftmost column = (1, 1, 1, ...); all others = (1, 0, 1, 0, 1, ...).
T(n,1) = T(n,n) = 1, T(n,k) = (1 - (-1)^(n-k-1))/2. - G. C. Greubel,Dec 05 2016
Extensions
Definition corrected by Zhuorui He, Jul 21 2025
Comments