login
Triangle read by rows: starting with A138174, replace left border with (1, 1, 1, ...).
3

%I #15 Feb 26 2024 17:05:34

%S 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,

%T 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,

%U 0,1,0,1,0,1,0,1,0,1,1,0,1,0,1,0,1,0,1,0,1,0,1

%N Triangle read by rows: starting with A138174, replace left border with (1, 1, 1, ...).

%C Row sums = (1, 2, 2, 3, 3, 4, 4, 5, 5, ...).

%H G. C. Greubel, <a href="/A135839/b135839.txt">Table of n, a(n) for the first 50 rows</a>

%F 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, ...).

%F T(n,1) = T(n,n) = 1, T(n,k) = (1 - (-1)^(n-k-1))/2. - _G. C. Greubel_,Dec 05 2016

%e First few rows of the triangle are:

%e 1;

%e 1, 1;

%e 1, 0, 1;

%e 1, 1, 0, 1;

%e 1, 0, 1, 0, 1;

%e 1, 1, 0, 1, 0, 1;

%e 1, 0, 1, 0, 1, 0, 1;

%e ...

%t 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 *)

%t Flatten[Table[Join[{1},PadLeft[{},n,{0,1}]],{n,0,20}]] (* _Harvey P. Dale_, Feb 26 2024 *)

%K nonn,tabl

%O 1,1

%A _Gary W. Adamson_, Dec 01 2007