Solution:
Let n2a−1=(nxn+1)dn, where xn,dn∈N. Then dn≡−1(modn), so
n2a−1=(nxn+1)(nyn−1)for some xn,yn∈N
which reduces to na−nxnyn=yn−xn>−xnyn. From this we obtain xn⩽xnyn<n−1na⩽2a. It follows that in the sequence x1,x2,… there exists a term that occurs infinitely many times. Let us denote that term by X. Then nX+1∣n2a−1 and hence
nX+1∣X2(n2a−1)−a(n2x2−1)=a−X2
for infinitely many numbers n. This is possible only for a−X2=0, i.e. X2=a.
Second solution. As in the first solution, let n2a−1=(nxn+1)(nyn−1), i.e. yn−xn=n(a−xnyn)=ndn. We distinguish three cases.
(1) If dn>0, then a=dn+xn(xn+ndn)>ndnxn, which is impossible for n⩾a.
(2) If dn<0, then a=dn+yn(yn−ndn)=yn2−dn(nyn−1)>nyn−1, which is impossible for n⩾a+1.
(3) If dn=0, then a=xn2, a perfect square.