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”).

A355246
Square array A(n, k), n, k >= 0, read by antidiagonals; for any m > 0, the position of the m-th rightmost 0 in the binary expansion of A(n, k) is the greatest of the positions of the m-th rightmost 0 in the binary expansions of n and k (the least significant bit having position 0).
1
0, 1, 1, 2, 1, 2, 3, 1, 1, 3, 4, 3, 2, 3, 4, 5, 1, 3, 3, 1, 5, 6, 5, 2, 3, 2, 5, 6, 7, 5, 5, 3, 3, 5, 5, 7, 8, 7, 6, 3, 4, 3, 6, 7, 8, 9, 1, 7, 3, 5, 5, 3, 7, 1, 9, 10, 9, 2, 7, 6, 5, 6, 7, 2, 9, 10, 11, 9, 9, 3, 7, 5, 5, 7, 3, 9, 9, 11, 12, 11, 10, 3, 4, 7, 6, 7, 4, 3, 10, 11, 12
OFFSET
0,4
COMMENTS
Leading 0's are taken into account.
FORMULA
A(n, k) = A(k, n).
A(m, A(n, k)) = A(A(m, n), k).
A(n, n) = n.
A(n, n) = 0.
A(n, k) < 2^m for any n < 2^m and k < 2^m.
A(m, A355245(n, k)) = A355245(A(m, n), A(m, k)).
A355245(m, A(n, k)) = A(A355245(m, n), A355245(m, k)).
EXAMPLE
Array A(n, k) begins:
n\k| 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
---+----------------------------------------------------------
0| 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
1| 1 1 1 3 1 5 5 7 1 9 9 11 9 13 13 15
2| 2 1 2 3 2 5 6 7 2 9 10 11 10 13 14 15
3| 3 3 3 3 3 3 3 7 3 3 3 11 3 11 11 15
4| 4 1 2 3 4 5 6 7 4 9 10 11 12 13 14 15
5| 5 5 5 3 5 5 5 7 5 5 5 11 5 13 13 15
6| 6 5 6 3 6 5 6 7 6 5 6 11 6 13 14 15
7| 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 15
8| 8 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
9| 9 9 9 3 9 5 5 7 9 9 9 11 9 13 13 15
10| 10 9 10 3 10 5 6 7 10 9 10 11 10 13 14 15
.
For n = 876 and k = 425:
- the corresponding binary expansions and pairings of 0's are as follows (stars indicate greatest positions of 0's):
* * * * *
876 ... 0 0 0 1 1 0 1 1 0 1 1 0 0
\ \ \ \ | / /
425 ... 0 0 0 0 1 1 0 1 0 1 0 0 1
* * *
-----------------------------
873 ... 0 0 0 1 1 0 1 1 0 1 0 0 1
- so A(876, 425) = 873.
PROG
(PARI) A(n, k) = { my (v=0, zn=0, zk=0, w=1, b=1); while (n || k, if (n%2==0, zn++); if (k%2==0, zk++); if (min(zn, zk)==w, w++, v+=b); n\=2; k\=2; b*=2); v }
CROSSREFS
See A355245 for a similar sequence.
Sequence in context: A159335 A109004 A103823 * A136642 A080382 A349203
KEYWORD
nonn,base,tabl
AUTHOR
Rémy Sigrist, Jun 25 2022
STATUS
approved