FIBS数列 (defun pow (num count) (if (> count 0) (* num (pow num (- count 1) ) ) 1 ) ) (defun expr (n) (if (eq n 1) 1 (if (eq n 2) 1 (+ (expr (- n 1) ) (expr (- n 2) ))))) (setq A (/ (sqrt 5) 5.0)) (setq B (/ (sqrt 5) 5.0)) (defun formula (n) (+ (* A (pow (/ (+ 1 (sqrt 5) ) 2.0 ) n)) (* B (pow (/ (- 1 (sqrt 5) ) 2.0 ) n)))) (defun test (n) (if (> n 0) (progn (print (formula n)) (print (expr n)) (test (- n 1) )) (print 'over))) (test 10)