Lemma: Let p>2 be a prime number and a∈N.
(i) pα∣ap+1, α≥1⇔pα+1∣ap+1
(ii) If a>2 then there exist q>2 prime number such that q∣ap+1, q∤a+1.
Proof: See 11.6.
If a=1 then above equation has only one solution.
If a=2 then n>1 and n=pα⋅n′, here p is the smallest prime divisor of n, (n′,p)=1.
Using the lemma, we get p2α∣2pα⋅n′+1⇒pα∣2n′+1.
By Euler's theorem
pα∣4pα−1(p−1)−1pα∣4n′−1}⇒thus pα∣4(n′,pα(p−1))−1=3, hence α=3,p=3.
By the Fermat's theorem
q∣64q−1−1q∣64n′−1}⇒we get that q∣64(q−1,n′)−1⇒q∣63⇒q=7.
But 8n′+1≡9≡0(mod7) this is contradiction.
The above cases, we get 2 solutions. Let a+1=2α>3 and p∣n, p is the smallest prime divisor of n.
If p=2 then an+1≡2≡0(mod4). This leads to contradiction.
Hence, we know that p>2 and p is an odd prime number.
p∣a2n−1p∣ap−1−1}⇒p∣a2−1=a(a−1)(a+1)⇒p∣a−1 and thus foran+1≡2≡0(modp) this leads to contradiction.
If there exist p1>2 then by Lemma there exist p2 such that p1∣a+1, p2∣ap1+1, p2∣a+1.
Using Lemma, we have p12∣ap1+1+1 and p2∣ap1+1+1 from here p22∣ap1p2+1 so on ... p12...pk2∣(ap1...pk−1)pk+1, k≥1.
By the Lemma there exist pk+1 prime number such that
pk+1∣(ap1⋯pk−1)pk+1,pk+1∤a1p1⋯pk−1−1+1,pk+1>2.
Also, (pk+1,p1...pk−1)=1 and if pk+1=pk. Therefore, pk2∣(ap1...pk−1)pk+1, thus for if we put there pk+1=pk then pk2∣(ap1...pk−1)pk+1⇒pk∣ap1...pk−1+1. This leads to contradiction. Thus we can construct infinitely many solutions of mentioned equation.