OFFSET
0,1
FORMULA
T(n, k) = 2^n - 2^(n-k-1), if k < n.
T(n, k) = 2^n + 2^(k-n), if k >= n.
T(n, 0..n-2) = 2*T(n-1, 0..n-2), for n > 1.
T(n, n-1) = 2^n - 1, for n > 0.
T(n, n) = 2^n + 1, for n > 0.
T(n, n+1..2*n) = 2*T(n-1, n-1..2*(n-1)), for n > 0.
EXAMPLE
Triangle begins:
k=0 1 2 3 4 5 6 7 8
n=0: 2
n=1: 1, 3, 4
n=2: 2, 3, 5, 6, 8
n=3: 4, 6, 7, 9,10,12,16
n=4: 8,12,14,15,17,18,20,24,32
...
Corresponding values for y in the equation:
k=0 1 2 3 4 5 6 7 8
n=0: 2
n=1: -1, 3, 2
n=2: -1,-3, 5, 3, 2
n=3: -1,-3,-7, 9, 5,3,2
n=4: -1,-3,-7,-15,17,9,5,3,2
...
PROG
(PARI) T(n, k) = if(k >= n, 2^n + 2^(k-n), 2^n - 2^(n-k-1));
(MATLAB)
function a = A362311( max_row )
r = 2; a = [];
for n = 1:max_row
a = [a r];
r = [2*r(1:n-1) 2^n-1 2^n+1 2*r(end-n+1:end)];
end
end
CROSSREFS
KEYWORD
nonn,tabf,easy
AUTHOR
Thomas Scheuerle, Apr 15 2023
STATUS
approved