OFFSET
0,9
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, ...
1, 1, 1, 1, 1, 1, 1, 1, 1, ...
1, 2, 4, 8, 16, 32, 64, 128, 256, ...
3, 3, 3, 3, 3, 3, 3, 3, 3, ...
1, 4, 16, 64, 256, 1024, 4096, 16384, 65536, ...
3, 5, 9, 17, 33, 65, 129, 257, 513, ...
3, 6, 12, 24, 48, 96, 192, 384, 768, ...
7, 7, 7, 7, 7, 7, 7, 7, 7, ...
1, 8, 64, 512, 4096, 32768, 262144, 2097152, 16777216, ...
...
MAPLE
A:= (n, k)-> Bits[Join](subs(0=[0$k][], Bits[Split](n))):
seq(seq(A(n, d-n), n=0..d), d=0..12);
# second Maple program:
A:= proc(n, k) option remember; `if`(n<2, n,
`if`(irem(n, 2, 'r')=1, A(r, k)*2+1, A(r, k)*2^k))
end:
seq(seq(A(n, d-n), n=0..d), d=0..12);
MATHEMATICA
A[n_, k_] := FromDigits[IntegerDigits[n, 2] /. 0 -> Sequence @@ Table[0, {k}], 2];
Table[A[n, d-n], {d, 0, 12}, {n, 0, d}] // Flatten (* Jean-François Alcover, Feb 02 2021 *)
CROSSREFS
AUTHOR
Alois P. Heinz, Jan 15 2021
STATUS
approved