
(/VERSIONCHECK 2) 

(DEFUN |INTHEORY;harmonic;IF;1| (|n| $)
  (PROG (|h| |k| |s| |#G3|)
    (RETURN
     (SEQ
      (COND ((< |n| 0) (|error| "harmonic not defined for negative integers"))
            (#1='T
             (SEQ
              (COND
               ((< |n| (QCAR (QREFELT $ 16)))
                (SEQ (LETT |s| 0 . #2=(|INTHEORY;harmonic;IF;1|))
                     (EXIT (LETT |h| (|spadConstant| $ 17) . #2#))))
               (#1#
                (PROGN
                 (LETT |#G3| (QREFELT $ 16) . #2#)
                 (LETT |s| (QCAR |#G3|) . #2#)
                 (LETT |h| (QCDR |#G3|) . #2#)
                 |#G3|)))
              (SEQ (LETT |k| (+ |s| 1) . #2#) G190
                   (COND ((> |k| |n|) (GO G191)))
                   (SEQ
                    (EXIT
                     (LETT |h|
                           (SPADCALL |h| (SPADCALL 1 |k| (QREFELT $ 18))
                                     (QREFELT $ 19))
                           . #2#)))
                   (LETT |k| (+ |k| 1) . #2#) (GO G190) G191 (EXIT NIL))
              (PROGN (RPLACA (QREFELT $ 16) |n|) (QCAR (QREFELT $ 16)))
              (PROGN (RPLACD (QREFELT $ 16) |h|) (QCDR (QREFELT $ 16)))
              (EXIT |h|)))))))) 

(DEFUN |INTHEORY;fibonacci;2I;2| (|n| $)
  (PROG (|f2| |f1| |#G14| |#G13| |#G12| |#G11| |t| |k| |#G9| |#G8|)
    (RETURN
     (SEQ
      (COND ((EQL |n| 0) 0)
            ((< |n| 0)
             (* (COND ((ODDP |n|) 1) (#1='T -1))
                (SPADCALL (- |n|) (QREFELT $ 21))))
            (#1#
             (SEQ
              (PROGN
               (LETT |#G8| 0 . #2=(|INTHEORY;fibonacci;2I;2|))
               (LETT |#G9| 1 . #2#)
               (LETT |f1| |#G8| . #2#)
               (LETT |f2| |#G9| . #2#))
              (SEQ (LETT |k| (- (INTEGER-LENGTH |n|) 2) . #2#) G190
                   (COND ((< |k| 0) (GO G191)))
                   (SEQ (LETT |t| (SPADCALL |f2| 2 (QREFELT $ 23)) . #2#)
                        (PROGN
                         (LETT |#G11| (+ |t| (SPADCALL |f1| 2 (QREFELT $ 23)))
                               . #2#)
                         (LETT |#G12|
                               (+ |t|
                                  (* (SPADCALL 2 |f1| (QREFELT $ 24)) |f2|))
                               . #2#)
                         (LETT |f1| |#G11| . #2#)
                         (LETT |f2| |#G12| . #2#))
                        (EXIT
                         (COND
                          ((SPADCALL |n| |k| (QREFELT $ 26))
                           (PROGN
                            (LETT |#G13| |f2| . #2#)
                            (LETT |#G14| (+ |f1| |f2|) . #2#)
                            (LETT |f1| |#G13| . #2#)
                            (LETT |f2| |#G14| . #2#))))))
                   (LETT |k| (+ |k| -1) . #2#) (GO G190) G191 (EXIT NIL))
              (EXIT |f2|)))))))) 

(DEFUN |INTHEORY;euler;2I;3| (|n| $)
  (PROG (|e| |t| #1=#:G1839 |j| |i| #2=#:G1829 |l|)
    (RETURN
     (SEQ
      (COND ((< |n| 0) (|error| "euler not defined for negative integers"))
            ((ODDP |n|) 0)
            (#3='T
             (SEQ
              (LETT |l| (SPADCALL (QREFELT $ 10) (QREFELT $ 27))
                    . #4=(|INTHEORY;euler;2I;3|))
              (EXIT
               (COND ((< |n| |l|) (SPADCALL (QREFELT $ 10) |n| (QREFELT $ 28)))
                     (#3#
                      (SEQ
                       (SPADCALL (QREFELT $ 10)
                                 (SPADCALL
                                  (PROG1 (LETT #2# (- (+ |n| 1) |l|) . #4#)
                                    (|check-subtype| (>= #2# 0)
                                                     '(|NonNegativeInteger|)
                                                     #2#))
                                  0 (QREFELT $ 9))
                                 (QREFELT $ 29))
                       (SEQ (LETT |i| 1 . #4#) G190
                            (COND ((> |i| |l|) #5=(GO G191)))
                            (SEQ
                             (EXIT
                              (SPADCALL (QREFELT $ 10) |i| 0 (QREFELT $ 30))))
                            (LETT |i| (+ |i| 2) . #4#) #6=(GO G190) G191
                            (EXIT NIL))
                       (SEQ (LETT |i| (+ |l| 1) . #4#) G190
                            (COND ((> |i| |n|) #5#))
                            (SEQ (LETT |t| (LETT |e| 1 . #4#) . #4#)
                                 (SEQ (LETT |j| 2 . #4#)
                                      (LETT #1# (- |i| 2) . #4#) G190
                                      (COND ((> |j| #1#) #5#))
                                      (SEQ
                                       (LETT |t|
                                             (QUOTIENT2
                                              (* (* |t| (+ (- |i| |j|) 1))
                                                 (+ (- |i| |j|) 2))
                                              (SPADCALL |j| (- |j| 1)
                                                        (QREFELT $ 31)))
                                             . #4#)
                                       (EXIT
                                        (LETT |e|
                                              (+ |e|
                                                 (* |t|
                                                    (SPADCALL (QREFELT $ 10)
                                                              |j|
                                                              (QREFELT $ 28))))
                                              . #4#)))
                                      (LETT |j| (+ |j| 2) . #4#) #6# G191
                                      (EXIT NIL))
                                 (EXIT
                                  (SPADCALL (QREFELT $ 10) |i| (- |e|)
                                            (QREFELT $ 30))))
                            (LETT |i| (+ |i| 2) . #4#) #6# G191 (EXIT NIL))
                       (EXIT
                        (SPADCALL (QREFELT $ 10) |n| (QREFELT $ 28)))))))))))))) 

(DEFUN |INTHEORY;bernoulli;IF;4| (|n| $)
  (PROG (|b| |t| #1=#:G1850 |j| |i| #2=#:G1840 |l|)
    (RETURN
     (SEQ
      (COND ((< |n| 0) (|error| "bernoulli not defined for negative integers"))
            ((ODDP |n|)
             (COND
              ((EQL |n| 1)
               (SPADCALL (SPADCALL 1 2 (QREFELT $ 18)) (QREFELT $ 33)))
              (#3='T (|spadConstant| $ 17))))
            (#3#
             (SEQ
              (LETT |l| (SPADCALL (QREFELT $ 15) (QREFELT $ 34))
                    . #4=(|INTHEORY;bernoulli;IF;4|))
              (EXIT
               (COND ((< |n| |l|) (SPADCALL (QREFELT $ 15) |n| (QREFELT $ 35)))
                     (#3#
                      (SEQ
                       (SPADCALL (QREFELT $ 15)
                                 (SPADCALL
                                  (PROG1 (LETT #2# (- (+ |n| 1) |l|) . #4#)
                                    (|check-subtype| (>= #2# 0)
                                                     '(|NonNegativeInteger|)
                                                     #2#))
                                  (|spadConstant| $ 17) (QREFELT $ 14))
                                 (QREFELT $ 36))
                       (SEQ (LETT |i| 1 . #4#) G190
                            (COND ((> |i| |l|) #5=(GO G191)))
                            (SEQ
                             (EXIT
                              (SPADCALL (QREFELT $ 15) |i|
                                        (|spadConstant| $ 17) (QREFELT $ 37))))
                            (LETT |i| (+ |i| 2) . #4#) #6=(GO G190) G191
                            (EXIT NIL))
                       (SEQ (LETT |i| (+ |l| 1) . #4#) G190
                            (COND ((> |i| |n|) #5#))
                            (SEQ (LETT |t| 1 . #4#)
                                 (LETT |b|
                                       (SPADCALL (- 1 |i|) 2 (QREFELT $ 18))
                                       . #4#)
                                 (SEQ (LETT |j| 2 . #4#)
                                      (LETT #1# (- |i| 2) . #4#) G190
                                      (COND ((> |j| #1#) #5#))
                                      (SEQ
                                       (LETT |t|
                                             (QUOTIENT2
                                              (* (* |t| (+ (- |i| |j|) 2))
                                                 (+ (- |i| |j|) 3))
                                              (SPADCALL |j| (- |j| 1)
                                                        (QREFELT $ 31)))
                                             . #4#)
                                       (EXIT
                                        (LETT |b|
                                              (SPADCALL |b|
                                                        (SPADCALL
                                                         (SPADCALL |t|
                                                                   (QREFELT $
                                                                            38))
                                                         (SPADCALL
                                                          (QREFELT $ 15) |j|
                                                          (QREFELT $ 35))
                                                         (QREFELT $ 39))
                                                        (QREFELT $ 19))
                                              . #4#)))
                                      (LETT |j| (+ |j| 2) . #4#) #6# G191
                                      (EXIT NIL))
                                 (EXIT
                                  (SPADCALL (QREFELT $ 15) |i|
                                            (SPADCALL
                                             (SPADCALL |b|
                                                       (SPADCALL (+ |i| 1)
                                                                 (QREFELT $
                                                                          38))
                                                       (QREFELT $ 40))
                                             (QREFELT $ 33))
                                            (QREFELT $ 37))))
                            (LETT |i| (+ |i| 2) . #4#) #6# G191 (EXIT NIL))
                       (EXIT
                        (SPADCALL (QREFELT $ 15) |n| (QREFELT $ 35)))))))))))))) 

(DEFUN |INTHEORY;inverse| (|a| |b| $)
  (PROG (|d1| |c1| |#G28| |#G27| |#G26| |#G25| |r| |q| |borg|)
    (RETURN
     (SEQ (LETT |borg| |b| . #1=(|INTHEORY;inverse|)) (LETT |c1| 1 . #1#)
          (LETT |d1| 0 . #1#)
          (SEQ G190 (COND ((NULL (COND ((EQL |b| 0) 'NIL) ('T 'T))) (GO G191)))
               (SEQ (LETT |q| (QUOTIENT2 |a| |b|) . #1#)
                    (LETT |r| (- |a| (* |q| |b|)) . #1#)
                    (PROGN
                     (LETT |#G25| |b| . #1#)
                     (LETT |#G26| |r| . #1#)
                     (LETT |a| |#G25| . #1#)
                     (LETT |b| |#G26| . #1#))
                    (EXIT
                     (PROGN
                      (LETT |#G27| |d1| . #1#)
                      (LETT |#G28| (- |c1| (* |q| |d1|)) . #1#)
                      (LETT |c1| |#G27| . #1#)
                      (LETT |d1| |#G28| . #1#))))
               NIL (GO G190) G191 (EXIT NIL))
          (EXIT
           (COND ((EQL |a| 1) (SPADCALL |c1| |borg| (QREFELT $ 42)))
                 ('T (|error| "moduli are not relatively prime")))))))) 

(DEFUN |INTHEORY;chineseRemainder;5I;6| (|x1| |m1| |x2| |m2| $)
  (SEQ
   (COND ((OR (< |m1| 0) (< |m2| 0)) (|error| "moduli must be positive"))
         ('T
          (SEQ
           (LETT |x1| (SPADCALL |x1| |m1| (QREFELT $ 42))
                 . #1=(|INTHEORY;chineseRemainder;5I;6|))
           (LETT |x2| (SPADCALL |x2| |m2| (QREFELT $ 42)) . #1#)
           (EXIT
            (+ |x1|
               (* |m1|
                  (SPADCALL (* (- |x2| |x1|) (|INTHEORY;inverse| |m1| |m2| $))
                            |m2| (QREFELT $ 42)))))))))) 

(DEFUN |INTHEORY;jacobi;3I;7| (|a| |b| $)
  (PROG (|j| |k| #1=#:G1877 |#G38| |#G37|)
    (RETURN
     (SEQ (COND ((< |b| 0) (LETT |b| (- |b|) . #2=(|INTHEORY;jacobi;3I;7|))))
          (EXIT
           (COND
            ((EQL |b| 0) (|error| "second argument of jacobi may not be 0"))
            ((EQL |b| 1) 1)
            (#3='T
             (SEQ
              (COND
               ((SPADCALL |b| (QREFELT $ 44))
                (COND
                 ((< 1 (SPADCALL |a| 4 (QREFELT $ 42)))
                  (EXIT
                   (|error|
                    "J(a/b) not defined for b even and a = 2 or 3 (mod 4)"))))))
              (COND
               ((SPADCALL |b| (QREFELT $ 44))
                (COND ((SPADCALL |a| (QREFELT $ 44)) (EXIT 0)))))
              (SEQ (LETT |k| 0 . #2#) G190
                   (COND ((NULL (SPADCALL |b| (QREFELT $ 44))) #4=(GO G191)))
                   (SEQ (EXIT (LETT |b| (QUOTIENT2 |b| 2) . #2#)))
                   (LETT |k| (QSADD1 |k|) . #2#) #5=(GO G190) G191 (EXIT NIL))
              (LETT |j|
                    (SEQ
                     (COND
                      ((ODDP |k|)
                       (COND
                        ((EQL (SPADCALL |a| 8 (QREFELT $ 42)) 5) (EXIT -1)))))
                     (EXIT 1))
                    . #2#)
              (EXIT
               (COND ((EQL |b| 1) |j|)
                     (#3#
                      (SEQ (LETT |a| (SPADCALL |a| |b| (QREFELT $ 42)) . #2#)
                           (SEQ G190 (COND ((NULL (< 1 |a|)) #4#))
                                (SEQ
                                 (EXIT
                                  (COND
                                   ((ODDP |a|)
                                    (SEQ
                                     (COND
                                      ((EQL (REMAINDER2 |a| 4) 3)
                                       (COND
                                        ((EQL (REMAINDER2 |b| 4) 3)
                                         (LETT |j| (- |j|) . #2#)))))
                                     (EXIT
                                      (PROGN
                                       (LETT |#G37| (REMAINDER2 |b| |a|) . #2#)
                                       (LETT |#G38| |a| . #2#)
                                       (LETT |a| |#G37| . #2#)
                                       (LETT |b| |#G38| . #2#)))))
                                   ('T
                                    (SEQ
                                     (SEQ (LETT #1# NIL . #2#)
                                          (LETT |k| 0 . #2#) G190
                                          (COND (#1# #4#))
                                          (SEQ
                                           (EXIT
                                            (LETT |a| (QUOTIENT2 |a| 2)
                                                  . #2#)))
                                          (LETT |k|
                                                (PROG1 (QSADD1 |k|)
                                                  (LETT #1# (ODDP |a|) . #2#))
                                                . #2#)
                                          #5# G191 (EXIT NIL))
                                     (EXIT
                                      (COND
                                       ((ODDP |k|)
                                        (COND
                                         ((< 4 (REMAINDER2 (+ |b| 2) 8))
                                          (LETT |j| (- |j|) . #2#)))))))))))
                                NIL #5# G191 (EXIT NIL))
                           (EXIT (COND ((EQL |a| 0) 0) (#3# |j|))))))))))))))) 

(DEFUN |INTHEORY;legendre;3I;8| (|a| |p| $)
  (COND ((SPADCALL |p| (QREFELT $ 47)) (SPADCALL |a| |p| (QREFELT $ 45)))
        ('T (|error| "characteristic of legendre must be prime")))) 

(DEFUN |INTHEORY;eulerPhi;2I;9| (|n| $)
  (PROG (|r| #1=#:G1895 |entry|)
    (RETURN
     (SEQ
      (COND ((EQL |n| 0) 0)
            ('T
             (SEQ
              (LETT |r| (|spadConstant| $ 12) . #2=(|INTHEORY;eulerPhi;2I;9|))
              (SEQ (LETT |entry| NIL . #2#)
                   (LETT #1#
                         (SPADCALL (SPADCALL |n| (QREFELT $ 50))
                                   (QREFELT $ 54))
                         . #2#)
                   G190
                   (COND
                    ((OR (ATOM #1#) (PROGN (LETT |entry| (CAR #1#) . #2#) NIL))
                     (GO G191)))
                   (SEQ
                    (EXIT
                     (LETT |r|
                           (SPADCALL
                            (SPADCALL (- (QCAR |entry|) 1) (QCAR |entry|)
                                      (QREFELT $ 18))
                            |r| (QREFELT $ 39))
                           . #2#)))
                   (LETT #1# (CDR #1#) . #2#) (GO G190) G191 (EXIT NIL))
              (EXIT
               (SPADCALL (SPADCALL |n| |r| (QREFELT $ 55))
                         (QREFELT $ 56)))))))))) 

(DEFUN |INTHEORY;divisors;IL;10| (|n| $)
  (PROG (|oldList| |newList| #1=#:G1911 |m| |pow| #2=#:G1910 |k| #3=#:G1909
         |f|)
    (RETURN
     (SEQ (LETT |oldList| (LIST 1) . #4=(|INTHEORY;divisors;IL;10|))
          (SEQ (LETT |f| NIL . #4#)
               (LETT #3#
                     (SPADCALL (SPADCALL |n| (QREFELT $ 50)) (QREFELT $ 54))
                     . #4#)
               G190
               (COND
                ((OR (ATOM #3#) (PROGN (LETT |f| (CAR #3#) . #4#) NIL))
                 #5=(GO G191)))
               (SEQ (LETT |newList| |oldList| . #4#)
                    (SEQ (LETT |k| 1 . #4#) (LETT #2# (QCDR |f|) . #4#) G190
                         (COND ((QSGREATERP |k| #2#) #5#))
                         (SEQ (LETT |pow| (EXPT (QCAR |f|) |k|) . #4#)
                              (EXIT
                               (SEQ (LETT |m| NIL . #4#)
                                    (LETT #1# |oldList| . #4#) G190
                                    (COND
                                     ((OR (ATOM #1#)
                                          (PROGN
                                           (LETT |m| (CAR #1#) . #4#)
                                           NIL))
                                      #5#))
                                    (SEQ
                                     (EXIT
                                      (LETT |newList|
                                            (CONS (* |pow| |m|) |newList|)
                                            . #4#)))
                                    (LETT #1# (CDR #1#) . #4#) #6=(GO G190)
                                    G191 (EXIT NIL))))
                         (LETT |k| (QSADD1 |k|) . #4#) #6# G191 (EXIT NIL))
                    (EXIT (LETT |oldList| |newList| . #4#)))
               (LETT #3# (CDR #3#) . #4#) #6# G191 (EXIT NIL))
          (EXIT (SPADCALL (ELT $ 58) |oldList| (QREFELT $ 61))))))) 

(DEFUN |INTHEORY;numberOfDivisors;2I;11| (|n| $)
  (PROG (#1=#:G1914 #2=#:G1913 #3=#:G1915 #4=#:G1917 |entry|)
    (RETURN
     (SEQ
      (COND ((EQL |n| 0) 0)
            (#5='T
             (PROGN
              (LETT #1# NIL . #6=(|INTHEORY;numberOfDivisors;2I;11|))
              (SEQ (LETT |entry| NIL . #6#)
                   (LETT #4#
                         (SPADCALL (SPADCALL |n| (QREFELT $ 50))
                                   (QREFELT $ 54))
                         . #6#)
                   G190
                   (COND
                    ((OR (ATOM #4#) (PROGN (LETT |entry| (CAR #4#) . #6#) NIL))
                     (GO G191)))
                   (SEQ
                    (EXIT
                     (PROGN
                      (LETT #3# (+ 1 (QCDR |entry|)) . #6#)
                      (COND (#1# (LETT #2# (* #2# #3#) . #6#))
                            ('T
                             (PROGN
                              (LETT #2# #3# . #6#)
                              (LETT #1# 'T . #6#)))))))
                   (LETT #4# (CDR #4#) . #6#) (GO G190) G191 (EXIT NIL))
              (COND (#1# #2#) (#5# 1))))))))) 

(DEFUN |INTHEORY;sumOfDivisors;2I;12| (|n| $)
  (PROG (|r| #1=#:G1920 #2=#:G1919 #3=#:G1921 #4=#:G1922 #5=#:G1925 |entry|)
    (RETURN
     (SEQ
      (COND ((EQL |n| 0) 0)
            (#6='T
             (SEQ
              (LETT |r|
                    (PROGN
                     (LETT #1# NIL . #7=(|INTHEORY;sumOfDivisors;2I;12|))
                     (SEQ (LETT |entry| NIL . #7#)
                          (LETT #5#
                                (SPADCALL (SPADCALL |n| (QREFELT $ 50))
                                          (QREFELT $ 54))
                                . #7#)
                          G190
                          (COND
                           ((OR (ATOM #5#)
                                (PROGN (LETT |entry| (CAR #5#) . #7#) NIL))
                            (GO G191)))
                          (SEQ
                           (EXIT
                            (PROGN
                             (LETT #3#
                                   (SPADCALL
                                    (-
                                     (EXPT (QCAR |entry|)
                                           (+
                                            (PROG1
                                                (LETT #4# (QCDR |entry|) . #7#)
                                              (|check-subtype| (>= #4# 0)
                                                               '(|NonNegativeInteger|)
                                                               #4#))
                                            1))
                                     1)
                                    (- (QCAR |entry|) 1) (QREFELT $ 18))
                                   . #7#)
                             (COND
                              (#1#
                               (LETT #2# (SPADCALL #2# #3# (QREFELT $ 39))
                                     . #7#))
                              ('T
                               (PROGN
                                (LETT #2# #3# . #7#)
                                (LETT #1# 'T . #7#)))))))
                          (LETT #5# (CDR #5#) . #7#) (GO G190) G191 (EXIT NIL))
                     (COND (#1# #2#) (#6# (|spadConstant| $ 12))))
                    . #7#)
              (EXIT (SPADCALL |r| (QREFELT $ 56)))))))))) 

(DEFUN |INTHEORY;sumOfKthPowerDivisors;INniI;13| (|n| |k| $)
  (PROG (|r| #1=#:G1928 #2=#:G1927 #3=#:G1929 #4=#:G1930 #5=#:G1933 |entry|)
    (RETURN
     (SEQ
      (COND ((EQL |n| 0) 0)
            (#6='T
             (SEQ
              (LETT |r|
                    (PROGN
                     (LETT #1# NIL
                           . #7=(|INTHEORY;sumOfKthPowerDivisors;INniI;13|))
                     (SEQ (LETT |entry| NIL . #7#)
                          (LETT #5#
                                (SPADCALL (SPADCALL |n| (QREFELT $ 50))
                                          (QREFELT $ 54))
                                . #7#)
                          G190
                          (COND
                           ((OR (ATOM #5#)
                                (PROGN (LETT |entry| (CAR #5#) . #7#) NIL))
                            (GO G191)))
                          (SEQ
                           (EXIT
                            (PROGN
                             (LETT #3#
                                   (SPADCALL
                                    (-
                                     (EXPT (QCAR |entry|)
                                           (+
                                            (* |k|
                                               (PROG1
                                                   (LETT #4# (QCDR |entry|)
                                                         . #7#)
                                                 (|check-subtype| (>= #4# 0)
                                                                  '(|NonNegativeInteger|)
                                                                  #4#)))
                                            |k|))
                                     1)
                                    (- (EXPT (QCAR |entry|) |k|) 1)
                                    (QREFELT $ 18))
                                   . #7#)
                             (COND
                              (#1#
                               (LETT #2# (SPADCALL #2# #3# (QREFELT $ 39))
                                     . #7#))
                              ('T
                               (PROGN
                                (LETT #2# #3# . #7#)
                                (LETT #1# 'T . #7#)))))))
                          (LETT #5# (CDR #5#) . #7#) (GO G190) G191 (EXIT NIL))
                     (COND (#1# #2#) (#6# (|spadConstant| $ 12))))
                    . #7#)
              (EXIT (SPADCALL |r| (QREFELT $ 56)))))))))) 

(DEFUN |INTHEORY;moebiusMu;2I;14| (|n| $)
  (PROG (#1=#:G1936 #2=#:G1938 #3=#:G1939 |k| |t|)
    (RETURN
     (SEQ
      (EXIT
       (COND ((EQL |n| 1) 1)
             (#4='T
              (SEQ
               (LETT |t| (SPADCALL |n| (QREFELT $ 50))
                     . #5=(|INTHEORY;moebiusMu;2I;14|))
               (SEQ
                (EXIT
                 (SEQ (LETT |k| NIL . #5#)
                      (LETT #3# (SPADCALL |t| (QREFELT $ 54)) . #5#) G190
                      (COND
                       ((OR (ATOM #3#) (PROGN (LETT |k| (CAR #3#) . #5#) NIL))
                        (GO G191)))
                      (SEQ
                       (EXIT
                        (COND
                         ((< 1 (QCDR |k|))
                          (PROGN
                           (LETT #1# (PROGN (LETT #2# 0 . #5#) (GO #2#)) . #5#)
                           (GO #1#))))))
                      (LETT #3# (CDR #3#) . #5#) (GO G190) G191 (EXIT NIL)))
                #1# (EXIT #1#))
               (EXIT
                (COND ((ODDP (SPADCALL |t| (QREFELT $ 67))) -1) (#4# 1)))))))
      #2# (EXIT #2#))))) 

(DEFUN |IntegerNumberTheoryFunctions| #1=()
  (PROG #1#
    (RETURN
     (PROG (#2=#:G1941)
       (RETURN
        (COND
         ((LETT #2# (HGET |$ConstructorCache| '|IntegerNumberTheoryFunctions|)
                . #3=(|IntegerNumberTheoryFunctions|))
          (|CDRwithIncrement| (CDAR #2#)))
         ('T
          (UNWIND-PROTECT
              (PROG1
                  (CDDAR
                   (HPUT |$ConstructorCache| '|IntegerNumberTheoryFunctions|
                         (LIST
                          (CONS NIL
                                (CONS 1 (|IntegerNumberTheoryFunctions;|))))))
                (LETT #2# T . #3#))
            (COND
             ((NOT #2#)
              (HREM |$ConstructorCache|
                    '|IntegerNumberTheoryFunctions|))))))))))) 

(DEFUN |IntegerNumberTheoryFunctions;| ()
  (PROG (|dv$| $ |pv$|)
    (RETURN
     (PROGN
      (LETT |dv$| '(|IntegerNumberTheoryFunctions|)
            . #1=(|IntegerNumberTheoryFunctions|))
      (LETT $ (GETREFV 69) . #1#)
      (QSETREFV $ 0 |dv$|)
      (QSETREFV $ 3 (LETT |pv$| (|buildPredVector| 0 0 NIL) . #1#))
      (|haddProp| |$ConstructorCache| '|IntegerNumberTheoryFunctions| NIL
                  (CONS 1 $))
      (|stuffDomainSlots| $)
      (QSETREFV $ 10 (SPADCALL 1 1 (QREFELT $ 9)))
      (QSETREFV $ 15 (SPADCALL 1 (|spadConstant| $ 12) (QREFELT $ 14)))
      (QSETREFV $ 16 (CONS 1 (|spadConstant| $ 12)))
      $)))) 

(MAKEPROP '|IntegerNumberTheoryFunctions| '|infovec|
          (LIST
           '#(NIL NIL NIL NIL NIL NIL (|NonNegativeInteger|) (|Integer|)
              (|IndexedFlexibleArray| 7 (NRTEVAL 0)) (0 . |new|) 'E
              (|Fraction| 7) (6 . |One|)
              (|IndexedFlexibleArray| 11 (NRTEVAL 0)) (10 . |new|) 'B 'H
              (16 . |Zero|) (20 . /) (26 . +) |INTHEORY;harmonic;IF;1|
              |INTHEORY;fibonacci;2I;2| (|PositiveInteger|) (32 . ^) (38 . *)
              (|Boolean|) (44 . |bit?|) (50 . |#|) (55 . |elt|)
              (61 . |concat!|) (67 . |setelt|) (74 . *) |INTHEORY;euler;2I;3|
              (80 . -) (85 . |#|) (90 . |elt|) (96 . |concat!|)
              (102 . |setelt|) (109 . |coerce|) (114 . *) (120 . /)
              |INTHEORY;bernoulli;IF;4| (126 . |positiveRemainder|)
              |INTHEORY;chineseRemainder;5I;6| (132 . |even?|)
              |INTHEORY;jacobi;3I;7| (|IntegerPrimesPackage| 7)
              (137 . |prime?|) |INTHEORY;legendre;3I;8| (|Factored| $)
              (142 . |factor|) (|Record| (|:| |factor| 7) (|:| |exponent| 7))
              (|List| 51) (|Factored| 7) (147 . |factors|) (152 . *)
              (158 . |numer|) |INTHEORY;eulerPhi;2I;9| (163 . <)
              (|Mapping| 25 7 7) (|List| 7) (169 . |sort|)
              |INTHEORY;divisors;IL;10| |INTHEORY;numberOfDivisors;2I;11|
              |INTHEORY;sumOfDivisors;2I;12|
              |INTHEORY;sumOfKthPowerDivisors;INniI;13| (175 . |One|)
              (179 . |numberOfFactors|) |INTHEORY;moebiusMu;2I;14|)
           '#(|sumOfKthPowerDivisors| 184 |sumOfDivisors| 190
              |numberOfDivisors| 195 |moebiusMu| 200 |legendre| 205 |jacobi|
              211 |harmonic| 217 |fibonacci| 222 |eulerPhi| 227 |euler| 232
              |divisors| 237 |chineseRemainder| 242 |bernoulli| 250)
           'NIL
           (CONS (|makeByteWordVec2| 1 'NIL)
                 (CONS '#()
                       (CONS '#()
                             (|makeByteWordVec2| 68
                                                 '(2 8 0 6 7 9 0 11 0 12 2 13 0
                                                   6 11 14 0 11 0 17 2 11 0 7 7
                                                   18 2 11 0 0 0 19 2 7 0 0 22
                                                   23 2 7 0 22 0 24 2 7 25 0 0
                                                   26 1 8 6 0 27 2 8 7 0 7 28 2
                                                   8 0 0 0 29 3 8 7 0 7 7 30 2
                                                   7 0 6 0 31 1 11 0 0 33 1 13
                                                   6 0 34 2 13 11 0 7 35 2 13 0
                                                   0 0 36 3 13 11 0 7 11 37 1
                                                   11 0 7 38 2 11 0 0 0 39 2 11
                                                   0 0 0 40 2 7 0 0 0 42 1 7 25
                                                   0 44 1 46 25 7 47 1 7 49 0
                                                   50 1 53 52 0 54 2 11 0 7 0
                                                   55 1 11 7 0 56 2 7 25 0 0 58
                                                   2 60 0 59 0 61 0 53 0 66 1
                                                   53 6 0 67 2 0 7 7 6 65 1 0 7
                                                   7 64 1 0 7 7 63 1 0 7 7 68 2
                                                   0 7 7 7 48 2 0 7 7 7 45 1 0
                                                   11 7 20 1 0 7 7 21 1 0 7 7
                                                   57 1 0 7 7 32 1 0 60 7 62 4
                                                   0 7 7 7 7 7 43 1 0 11 7
                                                   41)))))
           '|lookupComplete|)) 

(MAKEPROP '|IntegerNumberTheoryFunctions| 'NILADIC T) 
