0

A man wants to visit every house a circular road with $n$ houses. For this he starts at a house and then moves clockwise, always skipping exactly $i$ houses before stopping at the next house. For which values of $i$ does he visit every house? I am assuming that $i<n$

I think we need to use residual systems. But I cannot figure out how. For example, say we have $42$ houses. One residual system of $42$ is $\{1,2,3....42\}$. But this does not give use anz new information. of course, I know that $\phi(42) = 12$. But this does not help me either. Are these values actually useful? Or do I need to use another method?

Note: I would prefer methods that do not involve brute force, or rather any kind of program based computation (But if you have a method, please share it anyways.)

1 Answers1

3

If both $i$ and $n$ have no prime factors in common, all houses will be visited.

Some explanatory examples:
If $i=6$ and $n=12$, you can easily see that only 2 houses will be visited.
If $i=8$ and $n=12$, you'll end up with 3 houses being visited.
If $i=5$ and $n=12$, you'll end up with all houses being visited.

(By the way, there is no reason for $i<n$)

Dominique
  • 2,130