|
|
A103822
|
|
Table of "minimum oddness" operation.
|
|
2
|
|
|
0, 0, 0, 0, 1, 0, 0, 2, 2, 0, 0, 1, 2, 1, 0, 0, 4, 2, 2, 4, 0, 0, 1, 4, 3, 4, 1, 0, 0, 6, 2, 4, 4, 2, 6, 0, 0, 1, 2, 5, 4, 5, 2, 1, 0, 0, 8, 2, 6, 4, 4, 6, 2, 8, 0, 0, 1, 8, 3, 4, 5, 4, 3, 8, 1, 0, 0, 10, 2, 8, 4, 6, 6, 4, 8, 2, 10, 0, 0, 1, 2, 9, 8, 5, 6, 5, 8, 9, 2, 1, 0, 0, 12, 2, 10, 4, 8, 6, 6, 8, 4, 10, 2
(list;
table;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,8
|
|
COMMENTS
|
T(i,j) is whichever of i,j has the 0 in the rightmost differing bit of their binary representations. Defines a complete ordering of the integers: all even numbers are "less odd" than all odd numbers, for numbers of same parity remaining bits are recursively compared to determine ordering.
|
|
LINKS
|
|
|
FORMULA
|
T(i, j) = min(Ri, Rj), where Rn is the reflection of n at the "binary point".
|
|
EXAMPLE
|
T(11,13)=13, since the rightmost differing bit position is 1 for 11=1011 binary and 0 for 13=1101 binary.
|
|
PROG
|
(PARI) T(n, k) = { if (n==k, return (n), for (i=0, oo, my (nn=bittest(n, i), kk=bittest(k, i)); if (nn && !kk, return (k), kk && !nn, return (n)))) } \\ Rémy Sigrist, Feb 08 2020
|
|
CROSSREFS
|
Cf. A103823 (the complementary operation).
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|