a) (Solution of A.Ivanin, O.Volod'ko, A.Zhuk.) (Further we put pn+1=p1.)
Let pk be the greatest number among all pi (i=1,2,…,n). The condition api≡1(modpi+1) implies that a and pi are relatively prime for all i. Then apk+1−1≡1(modpk+1) by Little Fermat Theorem. Since, by the problem condition, apk≡1(modpk+1), we also have ad≡1(modpk+1) where d=GCD(pk+1−1,pk).
But from d∣pk it follows that d=pk or d=1. If d=pk then pk+1−1≥pk, pk+1>pk, a contradiction. Hence d=1 and a≡1(modpk+1), q.e.d.
b) Take any prime p1. By the Dirichlet theorem, we can choose a sequence of primes p1,…,pn such that p2−1∣p1, p3−1∣p2, …, pn−1∣pn−1.
Let pk+1−1=pkbk+1, k=1,…,n−1. Further, choose for any l=2,…,n a primitive root xl(modpl) and set ak=xkbk. In particular, ak+1≡1(modpk+1) and ak+1pk=xk+1pk+1−1≡1(modpk+1). Now by the Chinese Remainder Theorem, there exists an a such that a≡1(modp1) and a≡ak+1(modpk) for k=1,…,n−1. This a satisfies the condition.