Solution:
We shall prove by induction on m that an+m=aman+1−am−1an for every two positive integers n,m≥2. For m=2 this is the given recurrence relation. If for some m≥2 the equality is satisfied for every n, then
am+1+n=am+(n+1)=aman+2−am−1an+1==am(aan+1−an)−am−1an+1==(aam−am−1)an+1−aman=am+1an+1−aman
which completes the induction.
The recurrence relation shows that gcd(an,an−1)=1 for every n≥2. This and an+m=aman+1−am−1an imply that gcd(am+n,am)=gcd(am,an). Using induction again we conclude that for every two positive integers m and n we have gcd(am,an)=agcd(m,n). Now the assertion follows immediately: if 1<n1<n2<⋯<nk<⋯ is an infinite sequence of relatively prime integers then gcd(ani,anj)=agcd(ni,nj)=a1=1, i.e., an1,an2,…,ank,… are relatively prime. Therefore the set of their prime factors is infinite.