CS21003 Algorithms I
 CS29003 Algorithms Laboratory
Autumn 2012, L-T-P: 3-1-0 
L-T-P: 0-0-3 

Programming Assignment 5

The n-th cabtaxi number CT(n) is the smallest positive integer that can be written as a sum of two integer cubes in n different ways. If m = a3 + b3, we call a and b the components of the sum. We allow the components in the sum to be positive, negative and zero. In this exercise, you locate as many cabtaxi numbers as possible.

More information

Sample output

   Enter bound B: 100
   CT(1) = 1
         = (1)^3 + (0)^3
   CT(2) = 91
         = (6)^3 + (-5)^3
         = (3)^3 + (4)^3
   CT(3) = 728
         = (12)^3 + (-10)^3
         = (6)^3 + (8)^3
         = (9)^3 + (-1)^3

Submission Site


Back | Home