cat number theory question