Comment

Comment by contravariant

Well you want kx+b = x (mod m) to have a solution for all b and m (here b depends on how much earlier the hare enters the cycle). This means you'll need to have k-1 comprime to m for all m>0. Pretty sure k-1 = 1 is the only solution.

As a counter example where both k and k-1 are prime consider k=3. Then:

3 x + b = x (mod 2)

will fail to have a solution for odd b.

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton