(define (div a b) (zero? (remainder a b))) (define (next start) (let loop ((current (+ (* 2 start) 1))) (if (prime? current) current (loop (+ current 1))))) (define (prime? x) (and (not (div x 2)) (let loop ((i 3)) (or (> (* i i) x) (and (not (div x i)) (loop (+ i 2))))))) (define (run start) (display start) (newline) (unless (= 650680571 start) (run (next start)))) (run 307)