1 (defun full-fermat-test (n) 2 (defun aux-test (a) 3 (cond ((= a 1) t) 4 ((/= (expmod a n n) a) nil) 5 (t (aux-test (1- a))))) 6 (aux-test (1- n)))