Fixed an issue with square numbers and made it slightly more efficient, both problems caused by me trying to reinvent the wheel
21.py works perfectly and a lot faster than the haskell version. Had a slight issue with 496 which as it turns out is a perfect number and so is an amicable pair with itself, but you can't have a pair of 1 so doesn't count.