Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eshamster/28125a9dafdc1fc3e2cd to your computer and use it in GitHub Desktop.
Save eshamster/28125a9dafdc1fc3e2cd to your computer and use it in GitHub Desktop.
(defun inverse-factorize-from-prime (target &key (prime-series *prime-series*))
(if (null target)
1
(* (expt (lcar prime-series) (car target))
(inverse-factorize-from-prime (cdr target)
:prime-series (lcdr prime-series)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment