smarter sum of square in happy numbers