OFFSET
0,14
COMMENTS
The empty bit string is used as binary expansion of 0, so A(0,k) = 0.
LINKS
Alois P. Heinz, Antidiagonals n = 0..200, flattened
FORMULA
EXAMPLE
Square array A(n,k) begins:
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...
-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, ...
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, ...
-1, -1, 1, 5, 11, 19, 29, 41, 55, 71, 89, ...
1, 1, 3, 7, 13, 21, 31, 43, 57, 73, 91, ...
-1, 1, 5, 11, 19, 29, 41, 55, 71, 89, 109, ...
1, 3, 7, 13, 21, 31, 43, 57, 73, 91, 111, ...
-1, -2, 1, 14, 43, 94, 173, 286, 439, 638, 889, ...
1, 0, 3, 16, 45, 96, 175, 288, 441, 640, 891, ...
-1, 0, 5, 20, 51, 104, 185, 300, 455, 656, 909, ...
MAPLE
A:= proc(n, k) option remember; local m;
`if`(n=0, 0, k*A(iquo(n, 2, 'm'), k)+2*m-1)
end:
seq(seq(A(n, d-n), n=0..d), d=0..12);
# second Maple program:
A:= (n, k)-> (l-> add((2*l[i]-1)*k^(i-1), i=1..nops(l)))(Bits[Split](n)):
seq(seq(A(n, d-n), n=0..d), d=0..12);
CROSSREFS
AUTHOR
Alois P. Heinz, Jan 25 2023
STATUS
approved