Mixing Modulo Powers of Two
This page collects two elementary facts about how drops spread numbers over residue classes, and one measurement. The facts are classical; the measurement is mine. None of it says what an individual orbit must do.
Destinations cover every residue class
From the Affine Orbit Structure, within one residue class of (period ):
Since is odd, it is invertible mod . So as runs through consecutive values, the destinations run through every residue class mod exactly once. Starting points that agree on their low bits can land anywhere.
The order of 3 modulo
Theorem (classical). For : .
| Ratio | |||
|---|---|---|---|
| 2 | 4 | 2 | 1/2 |
| 3 | 8 | 2 | 1/4 |
| 4 | 16 | 4 | 1/4 |
| 5 | 32 | 8 | 1/4 |
| 6 | 64 | 16 | 1/4 |
| 8 | 256 | 64 | 1/4 |
| 10 | 1024 | 256 | 1/4 |
| 12 | 4096 | 1024 | 1/4 |
| 16 | 65536 | 16384 | 1/4 |
| 20 | 1048576 | 262144 | 1/4 |
The ratio stabilizes at exactly for all : the powers of 3 reach exactly half of the odd residues mod .
By lifting the exponent, for : .
So , confirming . And for , , so ; for this is just .
Since the order divides (the size of the group of odd residues), it is .
Powers of
For odd , has the same order as 3, so its powers reach the same half of the odd residues. For even , the order drops by a factor :
| Set | Share of the powers of 3 reached by powers of | ||
|---|---|---|---|
| 3 | 1 | 0 | 100% |
| 6 | 2 | 1 | 50% |
| 8 | 3 | 0 | 100% |
| 11 | 4 | 2 | 25% |
| 13 | 5 | 0 | 100% |
| 16 | 6 | 1 | 50% |
| 19 | 7 | 0 | 100% |
| 21 | 8 | 3 | 12.5% |
Consecutive sets: independent in density
The covering fact has an exact consequence. Take one residue class of and any residue class . Among the members of the first class, the destination lands in for exactly one in every . So the natural density of starting values that lie in the first class and whose destination lies in the second is the product of the two densities. Each dropping set agrees with a union of such classes apart from at most finitely many integers (see Affine Orbit Structure), so in the sense of density the dropping set of the destination is independent of the dropping set of the start.
A finite sample shows this only approximately. For , I measured the mutual information between the dropping set of and the dropping set of its destination:
| 2.356 bits | 2.343 bits | 0.013 bits | |
| 2.361 bits | 2.358 bits | 0.003 bits | |
| 2.362 bits | 2.361 bits | 0.0006 bits |
The measured value is not a constant of the map: it keeps shrinking as the sample grows, as sampling noise around zero would.
What this does not show
These are statements about averages over residue classes. They do not stop a particular orbit from landing in slow sets many times in a row — for example, 294583 → 248555 → 209719 → 176951 → 149303 → 125975 → 106292 is six consecutive drops, every one of them through Set₈. And the same residue-class facts hold for the negative integers, where the rule has cycles. The classical "almost all" results are proved by other, more careful arguments, and they stop short of "almost every orbit reaches 1": Terras (1976) showed that almost every (natural density 1) eventually falls below its starting value, and Tao (2019) that almost every orbit (in logarithmic density) attains almost bounded values.
Related
- Affine Orbit Structure — where the shift comes from
- Bit Destruction — the size of each drop