login
A349890
Triangle read by rows: T(n,k) = n * 2^e(n) - (4^e(n) - 1) / 3 - k * (k - 1) / 2 with e(n) = 1 + floor(log_2(n)) for n >= 1 and 1 <= k <= n.
0
1, 3, 2, 7, 6, 4, 11, 10, 8, 5, 19, 18, 16, 13, 9, 27, 26, 24, 21, 17, 12, 35, 34, 32, 29, 25, 20, 14, 43, 42, 40, 37, 33, 28, 22, 15, 59, 58, 56, 53, 49, 44, 38, 31, 23, 75, 74, 72, 69, 65, 60, 54, 47, 39, 30, 91, 90, 88, 85, 81, 76, 70, 63, 55, 46, 36, 107, 106, 104, 101, 97, 92, 86, 79, 71, 62, 52, 41
OFFSET
1,2
COMMENTS
Conjecture: The terms of the triangle yield a permutation of the positive integers (A000027).
FORMULA
T(2^n, 1) = A007583(n) for n >= 0.
T(n, 1) - T(n, n) = A000217(n-1) for n > 0.
T(n, k) = T(n-1, k) + T(n-1, k-1) - T(n-1-2^(e(n-1)-e(n-2)), k-1) with e(n) = 1 + floor(log_2(n)) for n > 3 and 1 < k < n-1 (conjectured).
EXAMPLE
The triangle T(n, k) for 1 <= k <= n begins:
n\k: 1 2 3 4 5 6 7 8 9 10 11
================================================
01 : 1
02 : 3 2
03 : 7 6 4
04 : 11 10 8 5
05 : 19 18 16 13 9
06 : 27 26 24 21 17 12
07 : 35 34 32 29 25 20 14
08 : 43 42 40 37 33 28 22 15
09 : 59 58 56 53 49 44 38 31 23
10 : 75 74 72 69 65 60 54 47 39 30
11 : 91 90 88 85 81 76 70 63 55 46 36
etc.
PROG
(PARI) T(n, k) = my(e=1+logint(n, 2)); n*2^e - (4^e-1)/3 - k*(k-1)/2;
row(n) = vector(n, k, T(n, k)); \\ Michel Marcus, Dec 05 2021
CROSSREFS
KEYWORD
nonn,easy,tabl
AUTHOR
Werner Schulte, Dec 04 2021
STATUS
approved