I was doing some music theoryzing (circles of fifths and fourths) and found an interesting problem.
Suppose, we have $2$ sequences: A and B.
A
$a(i+1) = a(i) + 7 \pmod {12}$
$a(0) = 0$
As $7$ and $12$ are coprime, period of this sequence will be $12$:
| i | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
|------+---+---+---+---+---+----+---+---+---+---+----+----+----|
| a(i) | 0 | 7 | 2 | 9 | 4 | 11 | 6 | 1 | 8 | 3 | 10 | 5 | 0 |
B
$b(i+1) = b(i) + 5 \pmod {12}$
$b(0) = 0$
As $5$ and $12$ are coprime, period of this sequence will be $12$:
| i | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
|------+---+---+----+---+---+---+---+----+---+---+----+----+----|
| b(i) | 0 | 5 | 10 | 3 | 8 | 1 | 6 | 11 | 4 | 9 | 2 | 7 | 0 |
For some magic reason, if we read B backwards we get A:
$b(12) = a(0) = 0$
$b(11) = a(1) = 7$
$b(10) = a(2) = 2$
$b(9) = a(3) = 9$
...
$b(12 - i) = a(i)\; \forall i \in [0, 12], i \in \mathbb{N}$
Why does this happen? I am puzzled.