login
A365743
Triangle T(n,k) read by rows: row n has length 2*n-1, and is generated by T(1,1)=0, T(n,1)=T(n-1,1)+3, T(n,2)=T(n,1)-1, and for k>=3, T(n,k)=3*T(n-1,k-2)+1.
0
0, 3, 2, 1, 6, 5, 10, 7, 4, 9, 8, 19, 16, 31, 22, 13, 12, 11, 28, 25, 58, 49, 94, 67, 40, 15, 14, 37, 34, 85, 76, 175, 148, 283, 202, 121, 18, 17, 46, 43, 112, 103, 256, 229, 526, 445, 850, 607, 364, 21, 20, 55, 52, 139, 130, 337, 310, 769, 688, 1579, 1336, 2551, 1822, 1093
OFFSET
1,2
COMMENTS
The sequence is a permutation of all integers >= 0.
Each row of T contains n*2-1 terms.
T(1,1) = 0; T(2,1) = T(1,1)+3; T(2,2) = T(2,1)-1; T(2,3) = 3*T(1,1)+1 = 1 ("knight jump").
Right diagonal is A003462.
The first two columns increase by 3^1, the next two columns by 3^2, and so on.
FORMULA
T(n,k) = ((12*n - 6*k - 3 + (-1)^k)/2 * 3^((2*k - 3 - (-1)^k)/4) - 1)/2.
T(n,k) = T(n-1,k) + 3^ceil(k/2).
EXAMPLE
Triangle T(n,k) begins:
n/k 1| 2| 3| 4| 5| 6| 7| 8| 9|
1| 0
2| 3 2 1
3| 6 5 10 7 4
4| 9 8 19 16 31 22 13
5| 12 11 28 25 58 49 94 67 40
6| 15 ...
PROG
(PARI) { local( T(n, k) = if(k<=2, 3*(n-1)+1-k, 3*T(n-1, k-2)+1) ); for(n=1, 8, for(k=1, 2*n-1, print1(T(n, k), ", ")); print); }
CROSSREFS
Cf. A003462 (right diagonal), A008585 (first column).
Sequence in context: A165958 A113655 A177977 * A208520 A114155 A192018
KEYWORD
nonn,tabf
AUTHOR
Ruud H.G. van Tol, Sep 19 2023
STATUS
approved