Date: 2008-03-17 05:37 am (UTC)
The problem is that all the programs start their search at 1 (except [livejournal.com profile] tinhorn2's, which starts at 9). If 1 is composite, then it's a counterexample, because it cannot be expressed as a prime plus twice a square. (In fact, 1 is neither prime nor composite.)

Fortunately, they're all easy to fix. The stream-based programs can use (integers-starting-with 3) instead of integers or (stream-iota); the sequence-based programs can use (in-naturals 3); and the loop program can use (let ((n 3)) ...).
This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting
.

Most Popular Tags

Powered by Dreamwidth Studios

Style Credit

Expand Cut Tags

No cut tags