Project:
 ```1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 ``` ```; rowland's prime-generating function (define (A106108 limit) ; initial sequence (let loop ((n 1) (as '(7))) (if (<= limit n) (reverse as) (let* ((n (+ n 1)) (a (+ (car as) (gcd n (car as))))) (loop n (cons a as)))))) (define (A132199 limit) ; differences (let loop ((n 2) (prev 7) (ds '())) (if (< limit (- n 1)) (reverse ds) (let* ((next (+ prev (gcd n prev))) (d (- next prev))) (loop (+ n 1) next (cons d ds)))))) (define (A137613 limit) ; only primes (let loop ((n 2) (prev 7) (ps '())) (if (<= limit (length ps)) (reverse ps) (let* ((next (+ prev (gcd n prev))) (d (- next prev))) (loop (+ n 1) next (if (= d 1) ps (cons d ps))))))) (define (least-prime-divisor n) (do ((d 3 (+ d 2))) ((zero? (modulo n d)) d))) (define (shortcut limit) (let loop ((limit limit) (k 5) (as '(5))) (if (= limit 1) (reverse as) (let* ((k (+ k (car as) -1)) (a (least-prime-divisor k))) (loop (- limit 1) k (cons a as)))))) (display (A106108 65)) (newline) (display (A132199 104)) (newline) (display (A137613 72)) (newline) (display (shortcut 72)) (newline) ```
 ```1 2 3 4 ``` ```(7 8 9 10 15 18 19 20 21 22 33 36 37 38 39 40 41 42 43 44 45 46 69 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 141 144 145 150 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167) (1 1 1 5 3 1 1 1 1 11 3 1 1 1 1 1 1 1 1 1 1 23 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 47 3 1 5 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 101 3 1 1 7) (5 3 11 3 23 3 47 3 5 3 101 3 7 11 3 13 233 3 467 3 5 3 941 3 7 1889 3 3779 3 7559 3 13 15131 3 53 3 7 30323 3 60647 3 5 3 101 3 121403 3 242807 3 5 3 19 7 5 3 47 3 37 5 3 17 3 199 53 3 29 3 486041 3 7 421 23) (5 3 11 3 23 3 47 3 5 3 101 3 7 11 3 13 233 3 467 3 5 3 941 3 7 1889 3 3779 3 7559 3 13 15131 3 53 3 7 30323 3 60647 3 5 3 101 3 121403 3 242807 3 5 3 19 7 5 3 47 3 37 5 3 17 3 199 53 3 29 3 486041 3 7 421 23) ```