\begin{patch}{IntegerNumberTheoryFunctionsXmpPagePatch1} \begin{paste}{IntegerNumberTheoryFunctionsXmpPageFull1}{IntegerNumberTheoryFunctionsXmpPageEmpty1} \pastebutton{IntegerNumberTheoryFunctionsXmpPageFull1}{\hidepaste} \tab{5}\spadcommand{div144 := divisors(144)\bound{div144 }} \indentrel{3}\begin{verbatim} (1) [1,2,3,4,6,8,9,12,16,18,24,36,48,72,144] Type: List Integer \end{verbatim} \indentrel{-3}\end{paste}\end{patch} \begin{patch}{IntegerNumberTheoryFunctionsXmpPageEmpty1} \begin{paste}{IntegerNumberTheoryFunctionsXmpPageEmpty1}{IntegerNumberTheoryFunctionsXmpPagePatch1} \pastebutton{IntegerNumberTheoryFunctionsXmpPageEmpty1}{\showpaste} \tab{5}\spadcommand{div144 := divisors(144)\bound{div144 }} \end{paste}\end{patch} \begin{patch}{IntegerNumberTheoryFunctionsXmpPagePatch2} \begin{paste}{IntegerNumberTheoryFunctionsXmpPageFull2}{IntegerNumberTheoryFunctionsXmpPageEmpty2} \pastebutton{IntegerNumberTheoryFunctionsXmpPageFull2}{\hidepaste} \tab{5}\spadcommand{\#(div144)\free{div144 }} \indentrel{3}\begin{verbatim} (2) 15 Type: PositiveInteger \end{verbatim} \indentrel{-3}\end{paste}\end{patch} \begin{patch}{IntegerNumberTheoryFunctionsXmpPageEmpty2} \begin{paste}{IntegerNumberTheoryFunctionsXmpPageEmpty2}{IntegerNumberTheoryFunctionsXmpPagePatch2} \pastebutton{IntegerNumberTheoryFunctionsXmpPageEmpty2}{\showpaste} \tab{5}\spadcommand{\#(div144)\free{div144 }} \end{paste}\end{patch} \begin{patch}{IntegerNumberTheoryFunctionsXmpPagePatch3} \begin{paste}{IntegerNumberTheoryFunctionsXmpPageFull3}{IntegerNumberTheoryFunctionsXmpPageEmpty3} \pastebutton{IntegerNumberTheoryFunctionsXmpPageFull3}{\hidepaste} \tab{5}\spadcommand{reduce(+,div144)\free{div144 }} \indentrel{3}\begin{verbatim} (3) 403 Type: PositiveInteger \end{verbatim} \indentrel{-3}\end{paste}\end{patch} \begin{patch}{IntegerNumberTheoryFunctionsXmpPageEmpty3} \begin{paste}{IntegerNumberTheoryFunctionsXmpPageEmpty3}{IntegerNumberTheoryFunctionsXmpPagePatch3} \pastebutton{IntegerNumberTheoryFunctionsXmpPageEmpty3}{\showpaste} \tab{5}\spadcommand{reduce(+,div144)\free{div144 }} \end{paste}\end{patch} \begin{patch}{IntegerNumberTheoryFunctionsXmpPagePatch4} \begin{paste}{IntegerNumberTheoryFunctionsXmpPageFull4}{IntegerNumberTheoryFunctionsXmpPageEmpty4} \pastebutton{IntegerNumberTheoryFunctionsXmpPageFull4}{\hidepaste} \tab{5}\spadcommand{numberOfDivisors(144)} \indentrel{3}\begin{verbatim} (4) 15 Type: PositiveInteger \end{verbatim} \indentrel{-3}\end{paste}\end{patch} \begin{patch}{IntegerNumberTheoryFunctionsXmpPageEmpty4} \begin{paste}{IntegerNumberTheoryFunctionsXmpPageEmpty4}{IntegerNumberTheoryFunctionsXmpPagePatch4} \pastebutton{IntegerNumberTheoryFunctionsXmpPageEmpty4}{\showpaste} \tab{5}\spadcommand{numberOfDivisors(144)} \end{paste}\end{patch} \begin{patch}{IntegerNumberTheoryFunctionsXmpPagePatch5} \begin{paste}{IntegerNumberTheoryFunctionsXmpPageFull5}{IntegerNumberTheoryFunctionsXmpPageEmpty5} \pastebutton{IntegerNumberTheoryFunctionsXmpPageFull5}{\hidepaste} \tab{5}\spadcommand{sumOfDivisors(144)} \indentrel{3}\begin{verbatim} (5) 403 Type: PositiveInteger \end{verbatim} \indentrel{-3}\end{paste}\end{patch} \begin{patch}{IntegerNumberTheoryFunctionsXmpPageEmpty5} \begin{paste}{IntegerNumberTheoryFunctionsXmpPageEmpty5}{IntegerNumberTheoryFunctionsXmpPagePatch5} \pastebutton{IntegerNumberTheoryFunctionsXmpPageEmpty5}{\showpaste} \tab{5}\spadcommand{sumOfDivisors(144)} \end{paste}\end{patch} \begin{patch}{IntegerNumberTheoryFunctionsXmpPagePatch6} \begin{paste}{IntegerNumberTheoryFunctionsXmpPageFull6}{IntegerNumberTheoryFunctionsXmpPageEmpty6} \pastebutton{IntegerNumberTheoryFunctionsXmpPageFull6}{\hidepaste} \tab{5}\spadcommand{f1(n) == reduce(+,[moebiusMu(d) * numberOfDivisors(quo(n,d)) for d in divisors(n)])\bound{f1 }} \indentrel{3}\begin{verbatim} Type: Void \end{verbatim} \indentrel{-3}\end{paste}\end{patch} \begin{patch}{IntegerNumberTheoryFunctionsXmpPageEmpty6} \begin{paste}{IntegerNumberTheoryFunctionsXmpPageEmpty6}{IntegerNumberTheoryFunctionsXmpPagePatch6} \pastebutton{IntegerNumberTheoryFunctionsXmpPageEmpty6}{\showpaste} \tab{5}\spadcommand{f1(n) == reduce(+,[moebiusMu(d) * numberOfDivisors(quo(n,d)) for d in divisors(n)])\bound{f1 }} \end{paste}\end{patch} \begin{patch}{IntegerNumberTheoryFunctionsXmpPagePatch7} \begin{paste}{IntegerNumberTheoryFunctionsXmpPageFull7}{IntegerNumberTheoryFunctionsXmpPageEmpty7} \pastebutton{IntegerNumberTheoryFunctionsXmpPageFull7}{\hidepaste} \tab{5}\spadcommand{f1(200)\free{f1 }} \indentrel{3}\begin{verbatim} (7) 1 Type: PositiveInteger \end{verbatim} \indentrel{-3}\end{paste}\end{patch} \begin{patch}{IntegerNumberTheoryFunctionsXmpPageEmpty7} \begin{paste}{IntegerNumberTheoryFunctionsXmpPageEmpty7}{IntegerNumberTheoryFunctionsXmpPagePatch7} \pastebutton{IntegerNumberTheoryFunctionsXmpPageEmpty7}{\showpaste} \tab{5}\spadcommand{f1(200)\free{f1 }} \end{paste}\end{patch} \begin{patch}{IntegerNumberTheoryFunctionsXmpPagePatch8} \begin{paste}{IntegerNumberTheoryFunctionsXmpPageFull8}{IntegerNumberTheoryFunctionsXmpPageEmpty8} \pastebutton{IntegerNumberTheoryFunctionsXmpPageFull8}{\hidepaste} \tab{5}\spadcommand{f1(846)\free{f1 }} \indentrel{3}\begin{verbatim} (8) 1 Type: PositiveInteger \end{verbatim} \indentrel{-3}\end{paste}\end{patch} \begin{patch}{IntegerNumberTheoryFunctionsXmpPageEmpty8} \begin{paste}{IntegerNumberTheoryFunctionsXmpPageEmpty8}{IntegerNumberTheoryFunctionsXmpPagePatch8} \pastebutton{IntegerNumberTheoryFunctionsXmpPageEmpty8}{\showpaste} \tab{5}\spadcommand{f1(846)\free{f1 }} \end{paste}\end{patch} \begin{patch}{IntegerNumberTheoryFunctionsXmpPagePatch9} \begin{paste}{IntegerNumberTheoryFunctionsXmpPageFull9}{IntegerNumberTheoryFunctionsXmpPageEmpty9} \pastebutton{IntegerNumberTheoryFunctionsXmpPageFull9}{\hidepaste} \tab{5}\spadcommand{f2(n) == reduce(+,[moebiusMu(d) * sumOfDivisors(quo(n,d)) for d in divisors(n)])\bound{f2 }} \indentrel{3}\begin{verbatim} Type: Void \end{verbatim} \indentrel{-3}\end{paste}\end{patch} \begin{patch}{IntegerNumberTheoryFunctionsXmpPageEmpty9} \begin{paste}{IntegerNumberTheoryFunctionsXmpPageEmpty9}{IntegerNumberTheoryFunctionsXmpPagePatch9} \pastebutton{IntegerNumberTheoryFunctionsXmpPageEmpty9}{\showpaste} \tab{5}\spadcommand{f2(n) == reduce(+,[moebiusMu(d) * sumOfDivisors(quo(n,d)) for d in divisors(n)])\bound{f2 }} \end{paste}\end{patch} \begin{patch}{IntegerNumberTheoryFunctionsXmpPagePatch10} \begin{paste}{IntegerNumberTheoryFunctionsXmpPageFull10}{IntegerNumberTheoryFunctionsXmpPageEmpty10} \pastebutton{IntegerNumberTheoryFunctionsXmpPageFull10}{\hidepaste} \tab{5}\spadcommand{f2(200)\free{f2 }} \indentrel{3}\begin{verbatim} (10) 200 Type: PositiveInteger \end{verbatim} \indentrel{-3}\end{paste}\end{patch} \begin{patch}{IntegerNumberTheoryFunctionsXmpPageEmpty10} \begin{paste}{IntegerNumberTheoryFunctionsXmpPageEmpty10}{IntegerNumberTheoryFunctionsXmpPagePatch10} \pastebutton{IntegerNumberTheoryFunctionsXmpPageEmpty10}{\showpaste} \tab{5}\spadcommand{f2(200)\free{f2 }} \end{paste}\end{patch} \begin{patch}{IntegerNumberTheoryFunctionsXmpPagePatch11} \begin{paste}{IntegerNumberTheoryFunctionsXmpPageFull11}{IntegerNumberTheoryFunctionsXmpPageEmpty11} \pastebutton{IntegerNumberTheoryFunctionsXmpPageFull11}{\hidepaste} \tab{5}\spadcommand{f2(846)\free{f2 }} \indentrel{3}\begin{verbatim} (11) 846 Type: PositiveInteger \end{verbatim} \indentrel{-3}\end{paste}\end{patch} \begin{patch}{IntegerNumberTheoryFunctionsXmpPageEmpty11} \begin{paste}{IntegerNumberTheoryFunctionsXmpPageEmpty11}{IntegerNumberTheoryFunctionsXmpPagePatch11} \pastebutton{IntegerNumberTheoryFunctionsXmpPageEmpty11}{\showpaste} \tab{5}\spadcommand{f2(846)\free{f2 }} \end{paste}\end{patch} \begin{patch}{IntegerNumberTheoryFunctionsXmpPagePatch12} \begin{paste}{IntegerNumberTheoryFunctionsXmpPageFull12}{IntegerNumberTheoryFunctionsXmpPageEmpty12} \pastebutton{IntegerNumberTheoryFunctionsXmpPageFull12}{\hidepaste} \tab{5}\spadcommand{fibonacci(25)} \indentrel{3}\begin{verbatim} (12) 75025 Type: PositiveInteger \end{verbatim} \indentrel{-3}\end{paste}\end{patch} \begin{patch}{IntegerNumberTheoryFunctionsXmpPageEmpty12} \begin{paste}{IntegerNumberTheoryFunctionsXmpPageEmpty12}{IntegerNumberTheoryFunctionsXmpPagePatch12} \pastebutton{IntegerNumberTheoryFunctionsXmpPageEmpty12}{\showpaste} \tab{5}\spadcommand{fibonacci(25)} \end{paste}\end{patch} \begin{patch}{IntegerNumberTheoryFunctionsXmpPagePatch13} \begin{paste}{IntegerNumberTheoryFunctionsXmpPageFull13}{IntegerNumberTheoryFunctionsXmpPageEmpty13} \pastebutton{IntegerNumberTheoryFunctionsXmpPageFull13}{\hidepaste} \tab{5}\spadcommand{[fibonacci(n) for n in 1..15]} \indentrel{3}\begin{verbatim} (13) [1,1,2,3,5,8,13,21,34,55,89,144,233,377,610] Type: List Integer \end{verbatim} \indentrel{-3}\end{paste}\end{patch} \begin{patch}{IntegerNumberTheoryFunctionsXmpPageEmpty13} \begin{paste}{IntegerNumberTheoryFunctionsXmpPageEmpty13}{IntegerNumberTheoryFunctionsXmpPagePatch13} \pastebutton{IntegerNumberTheoryFunctionsXmpPageEmpty13}{\showpaste} \tab{5}\spadcommand{[fibonacci(n) for n in 1..15]} \end{paste}\end{patch} \begin{patch}{IntegerNumberTheoryFunctionsXmpPagePatch14} \begin{paste}{IntegerNumberTheoryFunctionsXmpPageFull14}{IntegerNumberTheoryFunctionsXmpPageEmpty14} \pastebutton{IntegerNumberTheoryFunctionsXmpPageFull14}{\hidepaste} \tab{5}\spadcommand{fib(n) == reduce(+,[binomial(n-1-k,k) for k in 0..quo(n-1,2)])\bound{fib }} \indentrel{3}\begin{verbatim} Type: Void \end{verbatim} \indentrel{-3}\end{paste}\end{patch} \begin{patch}{IntegerNumberTheoryFunctionsXmpPageEmpty14} \begin{paste}{IntegerNumberTheoryFunctionsXmpPageEmpty14}{IntegerNumberTheoryFunctionsXmpPagePatch14} \pastebutton{IntegerNumberTheoryFunctionsXmpPageEmpty14}{\showpaste} \tab{5}\spadcommand{fib(n) == reduce(+,[binomial(n-1-k,k) for k in 0..quo(n-1,2)])\bound{fib }} \end{paste}\end{patch} \begin{patch}{IntegerNumberTheoryFunctionsXmpPagePatch15} \begin{paste}{IntegerNumberTheoryFunctionsXmpPageFull15}{IntegerNumberTheoryFunctionsXmpPageEmpty15} \pastebutton{IntegerNumberTheoryFunctionsXmpPageFull15}{\hidepaste} \tab{5}\spadcommand{fib(25)\free{fib }} \indentrel{3}\begin{verbatim} (15) 75025 Type: PositiveInteger \end{verbatim} \indentrel{-3}\end{paste}\end{patch} \begin{patch}{IntegerNumberTheoryFunctionsXmpPageEmpty15} \begin{paste}{IntegerNumberTheoryFunctionsXmpPageEmpty15}{IntegerNumberTheoryFunctionsXmpPagePatch15} \pastebutton{IntegerNumberTheoryFunctionsXmpPageEmpty15}{\showpaste} \tab{5}\spadcommand{fib(25)\free{fib }} \end{paste}\end{patch} \begin{patch}{IntegerNumberTheoryFunctionsXmpPagePatch16} \begin{paste}{IntegerNumberTheoryFunctionsXmpPageFull16}{IntegerNumberTheoryFunctionsXmpPageEmpty16} \pastebutton{IntegerNumberTheoryFunctionsXmpPageFull16}{\hidepaste} \tab{5}\spadcommand{[fib(n) for n in 1..15]\free{fib }} \indentrel{3}\begin{verbatim} (16) [1,1,2,3,5,8,13,21,34,55,89,144,233,377,610] Type: List Integer \end{verbatim} \indentrel{-3}\end{paste}\end{patch} \begin{patch}{IntegerNumberTheoryFunctionsXmpPageEmpty16} \begin{paste}{IntegerNumberTheoryFunctionsXmpPageEmpty16}{IntegerNumberTheoryFunctionsXmpPagePatch16} \pastebutton{IntegerNumberTheoryFunctionsXmpPageEmpty16}{\showpaste} \tab{5}\spadcommand{[fib(n) for n in 1..15]\free{fib }} \end{paste}\end{patch} \begin{patch}{IntegerNumberTheoryFunctionsXmpPagePatch17} \begin{paste}{IntegerNumberTheoryFunctionsXmpPageFull17}{IntegerNumberTheoryFunctionsXmpPageEmpty17} \pastebutton{IntegerNumberTheoryFunctionsXmpPageFull17}{\hidepaste} \tab{5}\spadcommand{legendre(3,5)} \indentrel{3}\begin{verbatim} (17) - 1 Type: Integer \end{verbatim} \indentrel{-3}\end{paste}\end{patch} \begin{patch}{IntegerNumberTheoryFunctionsXmpPageEmpty17} \begin{paste}{IntegerNumberTheoryFunctionsXmpPageEmpty17}{IntegerNumberTheoryFunctionsXmpPagePatch17} \pastebutton{IntegerNumberTheoryFunctionsXmpPageEmpty17}{\showpaste} \tab{5}\spadcommand{legendre(3,5)} \end{paste}\end{patch} \begin{patch}{IntegerNumberTheoryFunctionsXmpPagePatch18} \begin{paste}{IntegerNumberTheoryFunctionsXmpPageFull18}{IntegerNumberTheoryFunctionsXmpPageEmpty18} \pastebutton{IntegerNumberTheoryFunctionsXmpPageFull18}{\hidepaste} \tab{5}\spadcommand{legendre(23,691)} \indentrel{3}\begin{verbatim} (18) - 1 Type: Integer \end{verbatim} \indentrel{-3}\end{paste}\end{patch} \begin{patch}{IntegerNumberTheoryFunctionsXmpPageEmpty18} \begin{paste}{IntegerNumberTheoryFunctionsXmpPageEmpty18}{IntegerNumberTheoryFunctionsXmpPagePatch18} \pastebutton{IntegerNumberTheoryFunctionsXmpPageEmpty18}{\showpaste} \tab{5}\spadcommand{legendre(23,691)} \end{paste}\end{patch} \begin{patch}{IntegerNumberTheoryFunctionsXmpPagePatch19} \begin{paste}{IntegerNumberTheoryFunctionsXmpPageFull19}{IntegerNumberTheoryFunctionsXmpPageEmpty19} \pastebutton{IntegerNumberTheoryFunctionsXmpPageFull19}{\hidepaste} \tab{5}\spadcommand{h(d) == quo(reduce(+, [jacobi(d,k) for k in 1..quo(-d, 2)]), 2 - jacobi(d,2))\bound{h }} \indentrel{3}\begin{verbatim} Type: Void \end{verbatim} \indentrel{-3}\end{paste}\end{patch} \begin{patch}{IntegerNumberTheoryFunctionsXmpPageEmpty19} \begin{paste}{IntegerNumberTheoryFunctionsXmpPageEmpty19}{IntegerNumberTheoryFunctionsXmpPagePatch19} \pastebutton{IntegerNumberTheoryFunctionsXmpPageEmpty19}{\showpaste} \tab{5}\spadcommand{h(d) == quo(reduce(+, [jacobi(d,k) for k in 1..quo(-d, 2)]), 2 - jacobi(d,2))\bound{h }} \end{paste}\end{patch} \begin{patch}{IntegerNumberTheoryFunctionsXmpPagePatch20} \begin{paste}{IntegerNumberTheoryFunctionsXmpPageFull20}{IntegerNumberTheoryFunctionsXmpPageEmpty20} \pastebutton{IntegerNumberTheoryFunctionsXmpPageFull20}{\hidepaste} \tab{5}\spadcommand{h(-163)\free{h }} \indentrel{3}\begin{verbatim} (20) 1 Type: PositiveInteger \end{verbatim} \indentrel{-3}\end{paste}\end{patch} \begin{patch}{IntegerNumberTheoryFunctionsXmpPageEmpty20} \begin{paste}{IntegerNumberTheoryFunctionsXmpPageEmpty20}{IntegerNumberTheoryFunctionsXmpPagePatch20} \pastebutton{IntegerNumberTheoryFunctionsXmpPageEmpty20}{\showpaste} \tab{5}\spadcommand{h(-163)\free{h }} \end{paste}\end{patch} \begin{patch}{IntegerNumberTheoryFunctionsXmpPagePatch21} \begin{paste}{IntegerNumberTheoryFunctionsXmpPageFull21}{IntegerNumberTheoryFunctionsXmpPageEmpty21} \pastebutton{IntegerNumberTheoryFunctionsXmpPageFull21}{\hidepaste} \tab{5}\spadcommand{h(-499)\free{h }} \indentrel{3}\begin{verbatim} (21) 3 Type: PositiveInteger \end{verbatim} \indentrel{-3}\end{paste}\end{patch} \begin{patch}{IntegerNumberTheoryFunctionsXmpPageEmpty21} \begin{paste}{IntegerNumberTheoryFunctionsXmpPageEmpty21}{IntegerNumberTheoryFunctionsXmpPagePatch21} \pastebutton{IntegerNumberTheoryFunctionsXmpPageEmpty21}{\showpaste} \tab{5}\spadcommand{h(-499)\free{h }} \end{paste}\end{patch} \begin{patch}{IntegerNumberTheoryFunctionsXmpPagePatch22} \begin{paste}{IntegerNumberTheoryFunctionsXmpPageFull22}{IntegerNumberTheoryFunctionsXmpPageEmpty22} \pastebutton{IntegerNumberTheoryFunctionsXmpPageFull22}{\hidepaste} \tab{5}\spadcommand{h(-1832)\free{h }} \indentrel{3}\begin{verbatim} (22) 26 Type: PositiveInteger \end{verbatim} \indentrel{-3}\end{paste}\end{patch} \begin{patch}{IntegerNumberTheoryFunctionsXmpPageEmpty22} \begin{paste}{IntegerNumberTheoryFunctionsXmpPageEmpty22}{IntegerNumberTheoryFunctionsXmpPagePatch22} \pastebutton{IntegerNumberTheoryFunctionsXmpPageEmpty22}{\showpaste} \tab{5}\spadcommand{h(-1832)\free{h }} \end{paste}\end{patch}