login
Triangle read by rows: T(n,k) = 2*k - (1 + (-1)^(n-k))/2 (1 <= k <= n).
2

%I #15 Jun 07 2023 04:40:52

%S 1,2,3,1,4,5,2,3,6,7,1,4,5,8,9,2,3,6,7,10,11,1,4,5,8,9,12,13,2,3,6,7,

%T 10,11,14,15,1,4,5,8,9,12,13,16,17,2,3,6,7,10,11,14,15,18,19,1,4,5,8,

%U 9,12,13,16,17,20,21,2,3,6,7,10,11,14,15,18,19,22,23

%N Triangle read by rows: T(n,k) = 2*k - (1 + (-1)^(n-k))/2 (1 <= k <= n).

%C Row sums = A035608: (1, 5, 10, 18, 27, 39, ...).

%F 2*A002260 - A128174, as infinite lower triangular matrices; where A002260 = (1; 1,2; 1,2,3; ...) and A128174 = (1; 0,1; 1,0,1; ...).

%e First few rows of the triangle:

%e 1;

%e 2, 3;

%e 1, 4, 5;

%e 2, 3, 6, 7;

%e 1, 4, 5, 8, 9;

%e 2, 3, 6, 7, 10, 11;

%e 1, 4, 5, 8, 9, 12, 13;

%e ...

%p T := proc (n, k) options operator, arrow; 2*k-1/2-(1/2)*(-1)^(n-k) end proc: for n to 10 do seq(T(n, k), k = 1 .. n) end do; # yields sequence in triangular form - _Emeric Deutsch_, Jul 09 2007

%Y Cf. A002260, A035608, A128174.

%K nonn,tabl

%O 1,2

%A _Gary W. Adamson_, Jun 20 2007

%E a(47), a(49) corrected and more terms from _Georg Fischer_, Jun 07 2023