Solution:
Proof by induction on k.
For the base cases (k≤3) we can simply choose n=23−k to get n2k−7=23−7=12.
For the inductive step let k≥3 and assume there exist integers a and n such that
a2=n2k−7.
We will now endeavour to find integers b and m such that b2=m2k+1−7.
To do this we have two cases:
- If n is even then choose b=a and m=n/2. Thus b2=(2m)2k−7=m2k+1−7, as required.
- If n is odd, then note that a must also be odd. Let n=2x+1 and let a=2y+1. Now consider (a+2k−1)2.
(a+2k−1)2=a2+2ka+22k−2
=(n2k−7)+2ka+22k−2
={(}(2x+1)2k−7{)}+2k(2y+1)+22k−2
=(x+y+1+2k−3)2k+1−7.
So in this case we can simply choose b=a+2k−1 and m=x+y+1+2k−3.
Note here that this inductive step only works when k≥3 (otherwise m=x+y+1+2k−3 is not an integer).