2018-10-01から1ヶ月間の記事一覧
素因数分解をしてみたのでメモ (defun primep-1 (n i) (cond ((> i (sqrt n)) T) ((zerop (mod n i)) nil) (t (primep-1 n (1+ i))))) (defun primep (number) (primep-1 number 2)) (defun next-prime (n) (cond ((primep n) n) (t (next-prime (1+ n))))) …
素因数分解をしてみたのでメモ (defun primep-1 (n i) (cond ((> i (sqrt n)) T) ((zerop (mod n i)) nil) (t (primep-1 n (1+ i))))) (defun primep (number) (primep-1 number 2)) (defun next-prime (n) (cond ((primep n) n) (t (next-prime (1+ n))))) …