a) if n is a perfect square, is has form 4b or 4b+1.

Let n = a^2.

If a=2k (even) then n = 4(k^2) = 4b.

If a=2k+1 (odd) then n= 4k^2+4k+1 = 4(k^2+k) + 1 = 4b+1.

4b + 2 and 4b+3 are not of these form and it is thus impossible that they are perfect square.