Skip to content

Instantly share code, notes, and snippets.

@eshamster
Created August 23, 2015 03:08
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/4da870e65c183240d7c5 to your computer and use it in GitHub Desktop.
Save eshamster/4da870e65c183240d7c5 to your computer and use it in GitHub Desktop.
(defun check-series-mod (target a n)
(cond ((< target 2) nil)
((= target 2) t)
(t (do-series (val a to (1- n))
(if (= (mod target val) 0)
(return-from check-series-mod nil))
(if (> (expt val 2) target)
(return-from check-series-mod t)))
t)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment