I have the code already figured out and have found a way to get around the problem that for k > 6 the largest denominator is very large. But when my code adds up for example
1/float(2) + 1/float(3) + 1/float(7) + 1/float(42)
python says that it is not equal to 1, but it should be. Why does python recognize other sums as being equal to 1 but not this one?
 
     
     
    