You are viewing a single comment's thread. Return to all comments →
Observe that adding a "Room 0" doesn't change the results.
=> The task is to find the smallest n such that 2^n*A=A, mod (2N+1)
=> Divide all by gcd(A, 2N+1), then it becomes Euler's Theorem.
=> One way to find a candidate n is to use Euler's totient function.
No. of rooms visited before returning to start will be n, or a factor of n.
Seems like cookies are disabled on this browser, please enable them to open this website
Ichigo and Rooms
You are viewing a single comment's thread. Return to all comments →
Observe that adding a "Room 0" doesn't change the results.
=> The task is to find the smallest n such that 2^n*A=A, mod (2N+1)
=> Divide all by gcd(A, 2N+1), then it becomes Euler's Theorem.
=> One way to find a candidate n is to use Euler's totient function.
No. of rooms visited before returning to start will be n, or a factor of n.