Solution 1. Suppose there is an edge from vi to vj. Then i(j−1)=ij−i=kn for some integer k, which implies i=ij−kn. If gcd(i,n)=d and gcd(j,n)=e, then e divides ij−kn=i and thus e also divides d. Hence, if there is an edge from vi to vj, then gcd(j,n)∣gcd(i,n).
If there is a cycle in G, say vi1→vi2→⋯→vir→vi1, then we have
gcd(i1,n)∣gcd(ir,n)∣gcd(ir−1,n)∣…∣gcd(i2,n)∣gcd(i1,n)
which implies that all these greatest common divisors must be equal, say be equal to t.
Now we pick any of the ik, without loss of generality let it be i1. Then ir(i1−1) is a multiple of n and hence also (by dividing by t), i1−1 is a multiple of tn. Since i1 and i1−1 are relatively prime, also t and tn are relatively prime. So, by the Chinese remainder theorem, the value of i1 is uniquely determined modulo n=t⋅tn by the value of t. But, as i1 was chosen arbitrarily among the ik, this implies that all the ik have to be equal, a contradiction.
Solution 2. If a,b,c are integers such that ab−a and bc−b are multiples of n, then also ac−a=a(bc−b)+(ab−a)−(ab−a)c is a multiple of n. This implies that if there is an edge from va to vb and an edge from vb to vc, then there also must be an edge from va to vc. Therefore, if there are any cycles at all, the smallest cycle must have length 2. But suppose the vertices va and vb form such a cycle, i.e., ab−a and ab−b are both multiples of n. Then a−b is also a multiple of n, which can only happen if a=b, which is impossible.
Solution 3. Suppose there was a cycle vi1→vi2→⋯→vir→vi1. Then i1(i2−1) is a multiple of n, i.e., i1≡i1i2modn. Continuing in this manner, we get i1≡i1i2≡i1i2i3≡i1i2i3…irmodn. But the same holds for all ik, i.e., ik≡i1i2i3…irmodn. Hence i1≡i2≡⋯≡irmodn, which means i1=i2=⋯=ir, a contradiction.
Solution 4. Let n=k be the smallest value of n for which the corresponding graph has a cycle. We show that k is a prime power.
If k is not a prime power, it can be written as a product k=de of relatively prime integers greater than 1. Reducing all the numbers modulo d yields a single vertex or a cycle in the corresponding graph on d vertices, because if a(b−1)≡0modk then this equation also holds modulo d. But since the graph on d vertices has no cycles, by the minimality of k, we must have that all the indices of the cycle are congruent modulo d. The same holds modulo e and hence also modulo k=de. But then all the indices are equal, which is a contradiction.
Thus k must be a prime power k=pm. There are no edges ending at vk, so vk is not contained in any cycle. All edges not starting at vk end at a vertex belonging to a non-multiple of p, and all edges starting at a non-multiple of p must end at v1. But there is no edge starting at v1. Hence there is no cycle.
Solution 5. Suppose there was a cycle vi1→vi2→⋯→vir→vi1. Let q=pm be a prime power dividing n. We claim that either i1≡i2≡⋯≡ir≡0modq or i1≡i2≡⋯≡ir≡1modq.
Suppose that there is an is not divisible by q. Then, as is(is+1−1) is a multiple of q, is+1≡1modp. Similarly, we conclude is+2≡1modp and so on. So none of the labels is divisible by p, but since is(is+1−1) is a multiple of q=pm for all s, all is+1 are congruent to 1 modulo q. This proves the claim.
Now, as all the labels are congruent modulo all the prime powers dividing n, they must all be equal by the Chinese remainder theorem. This is a contradiction.