Skip to content

Instantly share code, notes, and snippets.

@shirok
Created March 31, 2013 10:13
Show Gist options
  • Save shirok/5280192 to your computer and use it in GitHub Desktop.
Save shirok/5280192 to your computer and use it in GitHub Desktop.
(use gauche.sequence)
(use math.prime)
(define (goedel n)
($ fold (^[p k s] (* s (expt p k))) 1 *primes*
$ map digit->integer $ number->string n))
(define meertens
(let1 n 0
(rec (f) (inc! n) (if (= n (goedel n)) n (f)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment