Umm...I think that last one isn't quite right. It stops at 22, but there's no solution at 29, either. You can prove this on paper with a sieve or by changing the "6" in trueiter == 6 to a larger number, so that it continues long enough to find the next value that doesn't have a solution.

I could be wrong—I can only prove this to myself by showing it—but I think the smallest number of consecutive solutions required to find the last non-solution is bound to the smallest coefficient.

## no subject

Date: 2010-01-27 03:09 pm (UTC)arantheUmm...I think that last one isn't quite right. It stops at 22, but there's no solution at 29, either. You can prove this on paper with a sieve or by changing the "6" in

to a larger number, so that it continues long enough to find the next value that doesn't have a solution.trueiter== 6I could be wrong—I can only prove this to myself by showing it—but I

thinkthe smallest number of consecutive solutions required to find the last non-solution is bound to the smallest coefficient.