login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A340666
A(n,k) is derived from n by replacing each 0 in its binary representation with a string of k 0's; square array A(n,k), n>=0, k>=0, read by antidiagonals.
5
0, 0, 1, 0, 1, 1, 0, 1, 2, 3, 0, 1, 4, 3, 1, 0, 1, 8, 3, 4, 3, 0, 1, 16, 3, 16, 5, 3, 0, 1, 32, 3, 64, 9, 6, 7, 0, 1, 64, 3, 256, 17, 12, 7, 1, 0, 1, 128, 3, 1024, 33, 24, 7, 8, 3, 0, 1, 256, 3, 4096, 65, 48, 7, 64, 9, 3, 0, 1, 512, 3, 16384, 129, 96, 7, 512, 33, 10, 7
OFFSET
0,9
LINKS
FORMULA
A000120(A(n,k)) = A000120(n) = log_2(A(n,0)+1).
A023416(A(n,k)) = k * A023416(n) for n >= 1.
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
Columns k=0-2, 4 give: A038573, A001477, A084471, A084473.
Rows n=0..17, 19 give: A000004, A000012, A000079, A010701, A000302, A000051(k+1), A007283, A010727, A001018, A087289, A007582(k+1), A062709(k+2), A164346, A181565(k+1), A005009, A181404(k+3), A001025, A199493, A253208(k+1).
Main diagonal gives A340667.
Sequence in context: A320354 A285320 A347710 * A168068 A163575 A355889
KEYWORD
nonn,tabl,look,base
AUTHOR
Alois P. Heinz, Jan 15 2021
STATUS
approved