Created
September 17, 2017 12:33
-
-
Save shirok/1bc47129a9cda28d9a2e0067137df96a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (use math.prime) | |
| (do ([p *primes* (cdr p)] | |
| [n 1 (+ n 1)] | |
| [sum 2 (+ sum (cadr p))]) | |
| [#f] | |
| (when (integer? (/ sum n)) | |
| (format #t "f(~d) = ~d (~a)\n" n (/ sum n) | |
| (if (bpsw-prime? (/ sum n)) "prime" "composite")))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment