'Happy numbers' solved