If N is a perfect square the there exists an n such that n^2=N.

Let n=p1^a1 p2^a2...pk^ak

be the prime decomposition of n, then:

N=n^2= p1^(2*a1) p2^(2*a2)...pk^(2*ak),

so the prime decomposition of N contains only even powers.

The other half of the proof goes through in a similar way, suppose

that the prime decomposition of N contains only even powers of primes,

then:

N = p1^(2*a1) p2^(2*a2)...pk^(2*ak),

so if n = p1^a1 p2^a2...pk^ak, N=n^2, so N is a square.

RonL