Solution:
For a pair m,n with gcd(∣m∣,∣n∣)=d>1, m2+kmn+n2 is divisible by d, so that the set A could also be the set of all integer multiples of d, which does not contain the element 1 and is therefore different from Z.
Now we consider numbers m,n with gcd(∣m∣,∣n∣)=1. For these we also have gcd(m2,n2)=1. Hence it follows from the extended Euclidean algorithm or from Fermat's little theorem that there exist integers r and s with rm2+sn2=1. Moreover, for x=y=m it is clear that (2+k)m2∈A, i.e. every integer multiple of m2 lies in A – correspondingly, every integer multiple of n2 lies in A. And for k=2 it follows that for all x,y∈A we also have (x+y)2 in A. Hence rm2,sn2 and consequently (rm2+sn2)2=12=1 lie in A.