We will prove that if a>1 is a positive integer such that a−1 is not a power of 2, then there are infinitely many positive integers n such that n divides aan−1−1 but n does not divide an−1. Therefore, the given problem follows directly as an application with a=2017.
In fact, there is an odd prime divisor p of a−1. Put s=vp(a−1)≥1, for any positive integer k, by LTE we have vp(apk−1)=vp(a−1)+k, this means that n=ps+1apk−1 is a positive integer. By LTE again,
vp(an−1)=vp(a−1)+vp(n)=s+vp(a−1)+k−(s+1)=s+k−1≥k.
Thus, pk∣an−1, we get n∣apk−1∣aan−1−1. It remains to show that n∤an−1. By above, we can write an−1=ps+k−1A and n=pk−1B for some positive integers A,B coprime to p. This gives
(n,an−1)=(pk−1A,pk−1B)=ps1(ps+k−1A,ps+k−1B)=ps1(papk−1,an−1)
which is clearly a divisor of
ps1(apk−1,an−1)=ps1(a(pk,n)−1)=ps1(apk−1−1)<ps+1apk−1=n.
This shows that n cannot divide an−1. The proof is done. □