1\begin{patch}{IntegerNumberTheoryFunctionsXmpPagePatch1} 2\begin{paste}{IntegerNumberTheoryFunctionsXmpPageFull1}{IntegerNumberTheoryFunctionsXmpPageEmpty1} 3\pastebutton{IntegerNumberTheoryFunctionsXmpPageFull1}{\hidepaste} 4\tab{5}\spadcommand{div144 := divisors(144)\bound{div144 }} 5\indentrel{3}\begin{verbatim} 6 (1) 7 [1, 2, 3, 4, 6, 8, 9, 12, 16, 18, 24, 36, 48, 72, 144] 8 Type: List(Integer) 9\end{verbatim} 10\indentrel{-3}\end{paste}\end{patch} 11 12\begin{patch}{IntegerNumberTheoryFunctionsXmpPageEmpty1} 13\begin{paste}{IntegerNumberTheoryFunctionsXmpPageEmpty1}{IntegerNumberTheoryFunctionsXmpPagePatch1} 14\pastebutton{IntegerNumberTheoryFunctionsXmpPageEmpty1}{\showpaste} 15\tab{5}\spadcommand{div144 := divisors(144)\bound{div144 }} 16\end{paste}\end{patch} 17 18\begin{patch}{IntegerNumberTheoryFunctionsXmpPagePatch2} 19\begin{paste}{IntegerNumberTheoryFunctionsXmpPageFull2}{IntegerNumberTheoryFunctionsXmpPageEmpty2} 20\pastebutton{IntegerNumberTheoryFunctionsXmpPageFull2}{\hidepaste} 21\tab{5}\spadcommand{\#(div144)\free{div144 }} 22\indentrel{3}\begin{verbatim} 23 (2) 15 24 Type: PositiveInteger 25\end{verbatim} 26\indentrel{-3}\end{paste}\end{patch} 27 28\begin{patch}{IntegerNumberTheoryFunctionsXmpPageEmpty2} 29\begin{paste}{IntegerNumberTheoryFunctionsXmpPageEmpty2}{IntegerNumberTheoryFunctionsXmpPagePatch2} 30\pastebutton{IntegerNumberTheoryFunctionsXmpPageEmpty2}{\showpaste} 31\tab{5}\spadcommand{\#(div144)\free{div144 }} 32\end{paste}\end{patch} 33 34\begin{patch}{IntegerNumberTheoryFunctionsXmpPagePatch3} 35\begin{paste}{IntegerNumberTheoryFunctionsXmpPageFull3}{IntegerNumberTheoryFunctionsXmpPageEmpty3} 36\pastebutton{IntegerNumberTheoryFunctionsXmpPageFull3}{\hidepaste} 37\tab{5}\spadcommand{reduce(+,div144)\free{div144 }} 38\indentrel{3}\begin{verbatim} 39 (3) 403 40 Type: PositiveInteger 41\end{verbatim} 42\indentrel{-3}\end{paste}\end{patch} 43 44\begin{patch}{IntegerNumberTheoryFunctionsXmpPageEmpty3} 45\begin{paste}{IntegerNumberTheoryFunctionsXmpPageEmpty3}{IntegerNumberTheoryFunctionsXmpPagePatch3} 46\pastebutton{IntegerNumberTheoryFunctionsXmpPageEmpty3}{\showpaste} 47\tab{5}\spadcommand{reduce(+,div144)\free{div144 }} 48\end{paste}\end{patch} 49 50\begin{patch}{IntegerNumberTheoryFunctionsXmpPagePatch4} 51\begin{paste}{IntegerNumberTheoryFunctionsXmpPageFull4}{IntegerNumberTheoryFunctionsXmpPageEmpty4} 52\pastebutton{IntegerNumberTheoryFunctionsXmpPageFull4}{\hidepaste} 53\tab{5}\spadcommand{numberOfDivisors(144)} 54\indentrel{3}\begin{verbatim} 55 (4) 15 56 Type: PositiveInteger 57\end{verbatim} 58\indentrel{-3}\end{paste}\end{patch} 59 60\begin{patch}{IntegerNumberTheoryFunctionsXmpPageEmpty4} 61\begin{paste}{IntegerNumberTheoryFunctionsXmpPageEmpty4}{IntegerNumberTheoryFunctionsXmpPagePatch4} 62\pastebutton{IntegerNumberTheoryFunctionsXmpPageEmpty4}{\showpaste} 63\tab{5}\spadcommand{numberOfDivisors(144)} 64\end{paste}\end{patch} 65 66\begin{patch}{IntegerNumberTheoryFunctionsXmpPagePatch5} 67\begin{paste}{IntegerNumberTheoryFunctionsXmpPageFull5}{IntegerNumberTheoryFunctionsXmpPageEmpty5} 68\pastebutton{IntegerNumberTheoryFunctionsXmpPageFull5}{\hidepaste} 69\tab{5}\spadcommand{sumOfDivisors(144)} 70\indentrel{3}\begin{verbatim} 71 (5) 403 72 Type: PositiveInteger 73\end{verbatim} 74\indentrel{-3}\end{paste}\end{patch} 75 76\begin{patch}{IntegerNumberTheoryFunctionsXmpPageEmpty5} 77\begin{paste}{IntegerNumberTheoryFunctionsXmpPageEmpty5}{IntegerNumberTheoryFunctionsXmpPagePatch5} 78\pastebutton{IntegerNumberTheoryFunctionsXmpPageEmpty5}{\showpaste} 79\tab{5}\spadcommand{sumOfDivisors(144)} 80\end{paste}\end{patch} 81 82\begin{patch}{IntegerNumberTheoryFunctionsXmpPagePatch6} 83\begin{paste}{IntegerNumberTheoryFunctionsXmpPageFull6}{IntegerNumberTheoryFunctionsXmpPageEmpty6} 84\pastebutton{IntegerNumberTheoryFunctionsXmpPageFull6}{\hidepaste} 85\tab{5}\spadcommand{f1(n) == reduce(+,[moebiusMu(d) * numberOfDivisors(quo(n,d)) for d in divisors(n)])\bound{f1 }} 86\indentrel{3}\begin{verbatim} 87 Type: Void 88\end{verbatim} 89\indentrel{-3}\end{paste}\end{patch} 90 91\begin{patch}{IntegerNumberTheoryFunctionsXmpPageEmpty6} 92\begin{paste}{IntegerNumberTheoryFunctionsXmpPageEmpty6}{IntegerNumberTheoryFunctionsXmpPagePatch6} 93\pastebutton{IntegerNumberTheoryFunctionsXmpPageEmpty6}{\showpaste} 94\tab{5}\spadcommand{f1(n) == reduce(+,[moebiusMu(d) * numberOfDivisors(quo(n,d)) for d in divisors(n)])\bound{f1 }} 95\end{paste}\end{patch} 96 97\begin{patch}{IntegerNumberTheoryFunctionsXmpPagePatch7} 98\begin{paste}{IntegerNumberTheoryFunctionsXmpPageFull7}{IntegerNumberTheoryFunctionsXmpPageEmpty7} 99\pastebutton{IntegerNumberTheoryFunctionsXmpPageFull7}{\hidepaste} 100\tab{5}\spadcommand{f1(200)\free{f1 }} 101\indentrel{3}\begin{verbatim} 102 (7) 1 103 Type: PositiveInteger 104\end{verbatim} 105\indentrel{-3}\end{paste}\end{patch} 106 107\begin{patch}{IntegerNumberTheoryFunctionsXmpPageEmpty7} 108\begin{paste}{IntegerNumberTheoryFunctionsXmpPageEmpty7}{IntegerNumberTheoryFunctionsXmpPagePatch7} 109\pastebutton{IntegerNumberTheoryFunctionsXmpPageEmpty7}{\showpaste} 110\tab{5}\spadcommand{f1(200)\free{f1 }} 111\end{paste}\end{patch} 112 113\begin{patch}{IntegerNumberTheoryFunctionsXmpPagePatch8} 114\begin{paste}{IntegerNumberTheoryFunctionsXmpPageFull8}{IntegerNumberTheoryFunctionsXmpPageEmpty8} 115\pastebutton{IntegerNumberTheoryFunctionsXmpPageFull8}{\hidepaste} 116\tab{5}\spadcommand{f1(846)\free{f1 }} 117\indentrel{3}\begin{verbatim} 118 (8) 1 119 Type: PositiveInteger 120\end{verbatim} 121\indentrel{-3}\end{paste}\end{patch} 122 123\begin{patch}{IntegerNumberTheoryFunctionsXmpPageEmpty8} 124\begin{paste}{IntegerNumberTheoryFunctionsXmpPageEmpty8}{IntegerNumberTheoryFunctionsXmpPagePatch8} 125\pastebutton{IntegerNumberTheoryFunctionsXmpPageEmpty8}{\showpaste} 126\tab{5}\spadcommand{f1(846)\free{f1 }} 127\end{paste}\end{patch} 128 129\begin{patch}{IntegerNumberTheoryFunctionsXmpPagePatch9} 130\begin{paste}{IntegerNumberTheoryFunctionsXmpPageFull9}{IntegerNumberTheoryFunctionsXmpPageEmpty9} 131\pastebutton{IntegerNumberTheoryFunctionsXmpPageFull9}{\hidepaste} 132\tab{5}\spadcommand{f2(n) == reduce(+,[moebiusMu(d) * sumOfDivisors(quo(n,d)) for d in divisors(n)])\bound{f2 }} 133\indentrel{3}\begin{verbatim} 134 Type: Void 135\end{verbatim} 136\indentrel{-3}\end{paste}\end{patch} 137 138\begin{patch}{IntegerNumberTheoryFunctionsXmpPageEmpty9} 139\begin{paste}{IntegerNumberTheoryFunctionsXmpPageEmpty9}{IntegerNumberTheoryFunctionsXmpPagePatch9} 140\pastebutton{IntegerNumberTheoryFunctionsXmpPageEmpty9}{\showpaste} 141\tab{5}\spadcommand{f2(n) == reduce(+,[moebiusMu(d) * sumOfDivisors(quo(n,d)) for d in divisors(n)])\bound{f2 }} 142\end{paste}\end{patch} 143 144\begin{patch}{IntegerNumberTheoryFunctionsXmpPagePatch10} 145\begin{paste}{IntegerNumberTheoryFunctionsXmpPageFull10}{IntegerNumberTheoryFunctionsXmpPageEmpty10} 146\pastebutton{IntegerNumberTheoryFunctionsXmpPageFull10}{\hidepaste} 147\tab{5}\spadcommand{f2(200)\free{f2 }} 148\indentrel{3}\begin{verbatim} 149 (10) 200 150 Type: PositiveInteger 151\end{verbatim} 152\indentrel{-3}\end{paste}\end{patch} 153 154\begin{patch}{IntegerNumberTheoryFunctionsXmpPageEmpty10} 155\begin{paste}{IntegerNumberTheoryFunctionsXmpPageEmpty10}{IntegerNumberTheoryFunctionsXmpPagePatch10} 156\pastebutton{IntegerNumberTheoryFunctionsXmpPageEmpty10}{\showpaste} 157\tab{5}\spadcommand{f2(200)\free{f2 }} 158\end{paste}\end{patch} 159 160\begin{patch}{IntegerNumberTheoryFunctionsXmpPagePatch11} 161\begin{paste}{IntegerNumberTheoryFunctionsXmpPageFull11}{IntegerNumberTheoryFunctionsXmpPageEmpty11} 162\pastebutton{IntegerNumberTheoryFunctionsXmpPageFull11}{\hidepaste} 163\tab{5}\spadcommand{f2(846)\free{f2 }} 164\indentrel{3}\begin{verbatim} 165 (11) 846 166 Type: PositiveInteger 167\end{verbatim} 168\indentrel{-3}\end{paste}\end{patch} 169 170\begin{patch}{IntegerNumberTheoryFunctionsXmpPageEmpty11} 171\begin{paste}{IntegerNumberTheoryFunctionsXmpPageEmpty11}{IntegerNumberTheoryFunctionsXmpPagePatch11} 172\pastebutton{IntegerNumberTheoryFunctionsXmpPageEmpty11}{\showpaste} 173\tab{5}\spadcommand{f2(846)\free{f2 }} 174\end{paste}\end{patch} 175 176\begin{patch}{IntegerNumberTheoryFunctionsXmpPagePatch12} 177\begin{paste}{IntegerNumberTheoryFunctionsXmpPageFull12}{IntegerNumberTheoryFunctionsXmpPageEmpty12} 178\pastebutton{IntegerNumberTheoryFunctionsXmpPageFull12}{\hidepaste} 179\tab{5}\spadcommand{fibonacci(25)} 180\indentrel{3}\begin{verbatim} 181 (12) 75025 182 Type: PositiveInteger 183\end{verbatim} 184\indentrel{-3}\end{paste}\end{patch} 185 186\begin{patch}{IntegerNumberTheoryFunctionsXmpPageEmpty12} 187\begin{paste}{IntegerNumberTheoryFunctionsXmpPageEmpty12}{IntegerNumberTheoryFunctionsXmpPagePatch12} 188\pastebutton{IntegerNumberTheoryFunctionsXmpPageEmpty12}{\showpaste} 189\tab{5}\spadcommand{fibonacci(25)} 190\end{paste}\end{patch} 191 192\begin{patch}{IntegerNumberTheoryFunctionsXmpPagePatch13} 193\begin{paste}{IntegerNumberTheoryFunctionsXmpPageFull13}{IntegerNumberTheoryFunctionsXmpPageEmpty13} 194\pastebutton{IntegerNumberTheoryFunctionsXmpPageFull13}{\hidepaste} 195\tab{5}\spadcommand{[fibonacci(n) for n in 1..15]} 196\indentrel{3}\begin{verbatim} 197 (13) 198 [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 199 610] 200 Type: List(Integer) 201\end{verbatim} 202\indentrel{-3}\end{paste}\end{patch} 203 204\begin{patch}{IntegerNumberTheoryFunctionsXmpPageEmpty13} 205\begin{paste}{IntegerNumberTheoryFunctionsXmpPageEmpty13}{IntegerNumberTheoryFunctionsXmpPagePatch13} 206\pastebutton{IntegerNumberTheoryFunctionsXmpPageEmpty13}{\showpaste} 207\tab{5}\spadcommand{[fibonacci(n) for n in 1..15]} 208\end{paste}\end{patch} 209 210\begin{patch}{IntegerNumberTheoryFunctionsXmpPagePatch14} 211\begin{paste}{IntegerNumberTheoryFunctionsXmpPageFull14}{IntegerNumberTheoryFunctionsXmpPageEmpty14} 212\pastebutton{IntegerNumberTheoryFunctionsXmpPageFull14}{\hidepaste} 213\tab{5}\spadcommand{fib(n) == reduce(+,[binomial(n-1-k,k) for k in 0..quo(n-1,2)])\bound{fib }} 214\indentrel{3}\begin{verbatim} 215 Type: Void 216\end{verbatim} 217\indentrel{-3}\end{paste}\end{patch} 218 219\begin{patch}{IntegerNumberTheoryFunctionsXmpPageEmpty14} 220\begin{paste}{IntegerNumberTheoryFunctionsXmpPageEmpty14}{IntegerNumberTheoryFunctionsXmpPagePatch14} 221\pastebutton{IntegerNumberTheoryFunctionsXmpPageEmpty14}{\showpaste} 222\tab{5}\spadcommand{fib(n) == reduce(+,[binomial(n-1-k,k) for k in 0..quo(n-1,2)])\bound{fib }} 223\end{paste}\end{patch} 224 225\begin{patch}{IntegerNumberTheoryFunctionsXmpPagePatch15} 226\begin{paste}{IntegerNumberTheoryFunctionsXmpPageFull15}{IntegerNumberTheoryFunctionsXmpPageEmpty15} 227\pastebutton{IntegerNumberTheoryFunctionsXmpPageFull15}{\hidepaste} 228\tab{5}\spadcommand{fib(25)\free{fib }} 229\indentrel{3}\begin{verbatim} 230 (15) 75025 231 Type: PositiveInteger 232\end{verbatim} 233\indentrel{-3}\end{paste}\end{patch} 234 235\begin{patch}{IntegerNumberTheoryFunctionsXmpPageEmpty15} 236\begin{paste}{IntegerNumberTheoryFunctionsXmpPageEmpty15}{IntegerNumberTheoryFunctionsXmpPagePatch15} 237\pastebutton{IntegerNumberTheoryFunctionsXmpPageEmpty15}{\showpaste} 238\tab{5}\spadcommand{fib(25)\free{fib }} 239\end{paste}\end{patch} 240 241\begin{patch}{IntegerNumberTheoryFunctionsXmpPagePatch16} 242\begin{paste}{IntegerNumberTheoryFunctionsXmpPageFull16}{IntegerNumberTheoryFunctionsXmpPageEmpty16} 243\pastebutton{IntegerNumberTheoryFunctionsXmpPageFull16}{\hidepaste} 244\tab{5}\spadcommand{[fib(n) for n in 1..15]\free{fib }} 245\indentrel{3}\begin{verbatim} 246 (16) 247 [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 248 610] 249 Type: List(Integer) 250\end{verbatim} 251\indentrel{-3}\end{paste}\end{patch} 252 253\begin{patch}{IntegerNumberTheoryFunctionsXmpPageEmpty16} 254\begin{paste}{IntegerNumberTheoryFunctionsXmpPageEmpty16}{IntegerNumberTheoryFunctionsXmpPagePatch16} 255\pastebutton{IntegerNumberTheoryFunctionsXmpPageEmpty16}{\showpaste} 256\tab{5}\spadcommand{[fib(n) for n in 1..15]\free{fib }} 257\end{paste}\end{patch} 258 259\begin{patch}{IntegerNumberTheoryFunctionsXmpPagePatch17} 260\begin{paste}{IntegerNumberTheoryFunctionsXmpPageFull17}{IntegerNumberTheoryFunctionsXmpPageEmpty17} 261\pastebutton{IntegerNumberTheoryFunctionsXmpPageFull17}{\hidepaste} 262\tab{5}\spadcommand{legendre(3,5)} 263\indentrel{3}\begin{verbatim} 264 (17) - 1 265 Type: Integer 266\end{verbatim} 267\indentrel{-3}\end{paste}\end{patch} 268 269\begin{patch}{IntegerNumberTheoryFunctionsXmpPageEmpty17} 270\begin{paste}{IntegerNumberTheoryFunctionsXmpPageEmpty17}{IntegerNumberTheoryFunctionsXmpPagePatch17} 271\pastebutton{IntegerNumberTheoryFunctionsXmpPageEmpty17}{\showpaste} 272\tab{5}\spadcommand{legendre(3,5)} 273\end{paste}\end{patch} 274 275\begin{patch}{IntegerNumberTheoryFunctionsXmpPagePatch18} 276\begin{paste}{IntegerNumberTheoryFunctionsXmpPageFull18}{IntegerNumberTheoryFunctionsXmpPageEmpty18} 277\pastebutton{IntegerNumberTheoryFunctionsXmpPageFull18}{\hidepaste} 278\tab{5}\spadcommand{legendre(23,691)} 279\indentrel{3}\begin{verbatim} 280 (18) - 1 281 Type: Integer 282\end{verbatim} 283\indentrel{-3}\end{paste}\end{patch} 284 285\begin{patch}{IntegerNumberTheoryFunctionsXmpPageEmpty18} 286\begin{paste}{IntegerNumberTheoryFunctionsXmpPageEmpty18}{IntegerNumberTheoryFunctionsXmpPagePatch18} 287\pastebutton{IntegerNumberTheoryFunctionsXmpPageEmpty18}{\showpaste} 288\tab{5}\spadcommand{legendre(23,691)} 289\end{paste}\end{patch} 290 291\begin{patch}{IntegerNumberTheoryFunctionsXmpPagePatch19} 292\begin{paste}{IntegerNumberTheoryFunctionsXmpPageFull19}{IntegerNumberTheoryFunctionsXmpPageEmpty19} 293\pastebutton{IntegerNumberTheoryFunctionsXmpPageFull19}{\hidepaste} 294\tab{5}\spadcommand{h(d) == quo(reduce(+, [jacobi(d,k) for k in 1..quo(-d, 2)]), 2 - jacobi(d,2))\bound{h }} 295\indentrel{3}\begin{verbatim} 296 Type: Void 297\end{verbatim} 298\indentrel{-3}\end{paste}\end{patch} 299 300\begin{patch}{IntegerNumberTheoryFunctionsXmpPageEmpty19} 301\begin{paste}{IntegerNumberTheoryFunctionsXmpPageEmpty19}{IntegerNumberTheoryFunctionsXmpPagePatch19} 302\pastebutton{IntegerNumberTheoryFunctionsXmpPageEmpty19}{\showpaste} 303\tab{5}\spadcommand{h(d) == quo(reduce(+, [jacobi(d,k) for k in 1..quo(-d, 2)]), 2 - jacobi(d,2))\bound{h }} 304\end{paste}\end{patch} 305 306\begin{patch}{IntegerNumberTheoryFunctionsXmpPagePatch20} 307\begin{paste}{IntegerNumberTheoryFunctionsXmpPageFull20}{IntegerNumberTheoryFunctionsXmpPageEmpty20} 308\pastebutton{IntegerNumberTheoryFunctionsXmpPageFull20}{\hidepaste} 309\tab{5}\spadcommand{h(-163)\free{h }} 310\indentrel{3}\begin{verbatim} 311 (20) 1 312 Type: PositiveInteger 313\end{verbatim} 314\indentrel{-3}\end{paste}\end{patch} 315 316\begin{patch}{IntegerNumberTheoryFunctionsXmpPageEmpty20} 317\begin{paste}{IntegerNumberTheoryFunctionsXmpPageEmpty20}{IntegerNumberTheoryFunctionsXmpPagePatch20} 318\pastebutton{IntegerNumberTheoryFunctionsXmpPageEmpty20}{\showpaste} 319\tab{5}\spadcommand{h(-163)\free{h }} 320\end{paste}\end{patch} 321 322\begin{patch}{IntegerNumberTheoryFunctionsXmpPagePatch21} 323\begin{paste}{IntegerNumberTheoryFunctionsXmpPageFull21}{IntegerNumberTheoryFunctionsXmpPageEmpty21} 324\pastebutton{IntegerNumberTheoryFunctionsXmpPageFull21}{\hidepaste} 325\tab{5}\spadcommand{h(-499)\free{h }} 326\indentrel{3}\begin{verbatim} 327 (21) 3 328 Type: PositiveInteger 329\end{verbatim} 330\indentrel{-3}\end{paste}\end{patch} 331 332\begin{patch}{IntegerNumberTheoryFunctionsXmpPageEmpty21} 333\begin{paste}{IntegerNumberTheoryFunctionsXmpPageEmpty21}{IntegerNumberTheoryFunctionsXmpPagePatch21} 334\pastebutton{IntegerNumberTheoryFunctionsXmpPageEmpty21}{\showpaste} 335\tab{5}\spadcommand{h(-499)\free{h }} 336\end{paste}\end{patch} 337 338\begin{patch}{IntegerNumberTheoryFunctionsXmpPagePatch22} 339\begin{paste}{IntegerNumberTheoryFunctionsXmpPageFull22}{IntegerNumberTheoryFunctionsXmpPageEmpty22} 340\pastebutton{IntegerNumberTheoryFunctionsXmpPageFull22}{\hidepaste} 341\tab{5}\spadcommand{h(-1832)\free{h }} 342\indentrel{3}\begin{verbatim} 343 (22) 26 344 Type: PositiveInteger 345\end{verbatim} 346\indentrel{-3}\end{paste}\end{patch} 347 348\begin{patch}{IntegerNumberTheoryFunctionsXmpPageEmpty22} 349\begin{paste}{IntegerNumberTheoryFunctionsXmpPageEmpty22}{IntegerNumberTheoryFunctionsXmpPagePatch22} 350\pastebutton{IntegerNumberTheoryFunctionsXmpPageEmpty22}{\showpaste} 351\tab{5}\spadcommand{h(-1832)\free{h }} 352\end{paste}\end{patch} 353 354