OFFSET
1,2
FORMULA
For 1<=j<=i: T(i, j)=2(i-j+1) if i and j are of opposite parity; T(i, j)=2(i-j)+1 if both i and j are odd; T(i, j)=2(i-j)+3 if both i and j are even. - Emeric Deutsch, Mar 23 2005
EXAMPLE
The first few rows of the triangle are:
1;
4, 3;
5, 4, 1;
8, 7, 4, 3;
9, 8, 5, 4, 1;
...
MAPLE
T:=proc(i, j) if j>i then 0 elif i+j mod 2 = 1 then 2*(i-j)+2 elif i mod 2 = 1 and j mod 2 = 1 then 2*(i-j)+1 elif i mod 2 = 0 and j mod 2 = 0 then 2*(i-j)+3 else fi end: for i from 1 to 13 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[Q[i, k]*R[k, j], {k, 1, 13}];
Table[T[i, j], {i, 1, 13}, {j, 1, i}] // Flatten (* Jean-François Alcover, Jul 24 2024 *)
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Gary W. Adamson, Mar 16 2005
EXTENSIONS
More terms from Emeric Deutsch, Mar 23 2005
STATUS
approved