A104570 Triangle read by rows: T(i,j) is the (i,j)-entry (1 <= j <= i) of the product R*Q of the infinite lower triangular matrices R = [1; 1,1; 1,1,1; 1,1,1,1; ...] and Q = [1; 1,3; 1,3,1; 1,3,1,3; ...].
1, 2, 3, 3, 6, 1, 4, 9, 2, 3, 5, 12, 3, 6, 1, 6, 15, 4, 9, 2, 3, 7, 18, 5, 12, 3, 6, 1, 8, 21, 6, 15, 4, 9, 2, 3, 9, 24, 7, 18, 5, 12, 3, 6, 1, 10, 27, 8, 21, 6, 15, 4, 9, 2, 3, 11, 30, 9, 24, 7, 18, 5, 12, 3, 6, 1, 12, 33, 10, 27, 8, 21, 6, 15, 4, 9, 2, 3, 13, 36, 11, 30, 9, 24, 7, 18, 5, 12, 3, 6, 1
Offset: 1
Examples
First few rows of the triangle: 1; 2, 3; 3, 6, 1; 4, 9, 2, 3; ...
Programs
-
Maple
T:=proc(i,j) if j>i then 0 elif j mod 2 = 1 then i-j+1 else 3*(i-j+1) fi end:for i from 1 to 14 do seq(T(i,j),j=1..i) od; # yields sequence in triangular form # Emeric Deutsch, Mar 23 2005
-
Mathematica
Q[i_, j_] := If[j <= i, 2 + (-1)^j, 0]; R[i_, j_] := If[j <= i, 1, 0]; T[i_, j_] := Sum[R[i, k]*Q[k, j], {k, 1, 13}]; Table[T[i, j], {i, 1, 13}, {j, 1, i}] // Flatten (* Jean-François Alcover, Jul 24 2024~ *)
Formula
Even columns (offset) = 1, 2, 3, ...; while odd columns = 3, 6, 9, ...
T(i,j) = i-j+1 if j <= i and j is odd; 3(i-j+1) if j <= i and j is even. - Emeric Deutsch, Mar 23 2005
Extensions
More terms from Emeric Deutsch, Mar 23 2005