{"_id": "2", "text": "Euclid There are infinitely many primes.\\ithm{infinitely many primes}"} {"_id": "5", "text": "Euler's Theorem \\ithm{Euler's} If $\\gcd(x,n)=1$, then $$ x^{\\vphi(n)} \\con 1\\pmod{n}. $$"} {"_id": "6", "text": "Chinese Remainder Theorem \\ithm{Chinese remainder} Let $a, b\\in\\Z$ and $n,m\\in\\N$ such that $\\gcd(n,m)=1$. Then there exists $x\\in\\Z$ such that \\begin{align*} x&\\con a\\pmod{m},\\\\ x&\\con b\\pmod{n}. \\end{align*} Moreover~$x$ is unique modulo~$mn$."} {"_id": "7", "text": "Pseudoprimality An integer~$p>1$ is prime if and only if for {\\em every} $a\\not\\con 0\\pmod{p}$, $$ a^{p-1}\\con 1\\pmod{p}. $$"} {"_id": "8", "text": "Primitive Roots There is a primitive root modulo any prime~$p$. In particular, the group $(\\zmod{p})^*$ is cyclic."} {"_id": "10", "text": "Gauss's Quadratic Reciprocity Law \\ithm{quadratic reciprocity} Suppose~$p$ and~$q$ are distinct odd primes. Then $$ \\kr{p}{q} = (-1)^{\\frac{p-1}{2}\\cdot \\frac{q-1}{2}}\\kr{q}{p}. $$ Also $$ \\kr{-1}{p} = (-1)^{(p-1)/2}\\qquad\\text{\\rm and}\\qquad \\kr{2}{p} = \\begin{cases} \\hfill1 & \\text{\\rm if } p\\con \\pm 1\\pmod{8}\\\\ -1 & \\text{\\rm if } p \\con \\pm 3\\pmod{8}. \\end{cases} $$"} {"_id": "11", "text": "Continued Fraction Limit Let $a_0, a_1, \\ldots $ be a sequence of integers such that $a_n > 0$ for all $n\\geq 1$, and for each $n\\geq 0$, set $c_n = [a_0, a_1, \\ldots a_n].$ Then $\\ds\\lim_{n\\ra \\infty} c_n$ exists."} {"_id": "12", "text": "Let $a_0, a_1, a_2, \\ldots $ be a sequence of real numbers such that $a_n > 0$ for all $n\\geq 1$, and for each $n\\geq 0$, set $c_n = [a_0, a_1, \\ldots a_n].$ Then $\\ds\\lim_{n\\ra \\infty} c_n$ exists if and only if the sum $\\sum_{n=0}^{\\infty} a_n$ diverges."} {"_id": "13", "text": "\\ithm{continued fraction existence} Let $x\\in\\R$ be a real number. Then $x$ is the value of the (possibly infinite) simple continued fraction $ [a_0, a_1, a_2, \\ldots] $ produced by the continued fraction procedure."} {"_id": "14", "text": "Periodic Characterization \\ithm{period continued fraction} An infinite simple continued fraction is periodic if and only if it represents a quadratic irrational."} {"_id": "15", "text": "A positive integer~$n$ is a sum of two squares if and only if all prime factors of~$p\\mid n$ such that $p\\con 3\\pmod{4}$ have even exponent in the prime factorization of~$n$."} {"_id": "16", "text": "The binary operation $+$ defined in Algorithm~\\ref{alg:grouplaw} endows the set $E(K)$ with an abelian group structure, with identity $\\O$."} {"_id": "21", "text": "Suppose $a,b,n\\in\\Z$. Then $\\gcd(a,b) = \\gcd(a,b-an)$."} {"_id": "22", "text": "For any integers $a,b,n$, we have $$\\gcd(an,bn) = \\gcd(a,b)\\cdot |n|.$$"} {"_id": "23", "text": "Suppose $a,b,n\\in\\Z$ are such that $n\\mid a$ and $n\\mid b$. Then $n\\mid \\gcd(a,b)$."} {"_id": "24", "text": "If~$R$ is a complete set of residues modulo~$n$ and $a\\in\\Z$ with $\\gcd(a,n)=1$, then $aR = \\{ax : x \\in R\\}$ is also a complete set of residues modulo~$n$."} {"_id": "25", "text": "Suppose that $m,n\\in\\N$ and $\\gcd(m,n)=1$. Then the map \\begin{equation}\\label{eqn:crtprod} \\psi: (\\zmod{mn})^* \\ra (\\zmod{m})^* \\cross (\\zmod{n})^*. \\end{equation} defined by $$ \\psi(c) = (c\\text{ mod } m, \\,\\,c \\text{ mod }n) $$ is a bijection."} {"_id": "27", "text": "The map $\\psi:(\\zmod{p})^*\\to \\{\\pm 1\\}$ given by $\\psi(a) = \\kr{a}{p}$ is a surjective group homomorphism."} {"_id": "28", "text": "Gauss's Lemma Let~$p$ be an odd prime and let~$a$ be an integer $\\not\\con 0\\pmod{p}$. Form the numbers $$ a,\\, 2a,\\, 3a,\\, \\ldots,\\, \\frac{p-1}{2} a $$ and reduce them modulo~$p$ to lie in the interval $(-\\frac{p}{2},\\,\\, \\frac{p}{2})$, i.e., for each of the above products $k\\cdot a$ find a number in the interval $(-\\frac{p}{2},\\,\\, \\frac{p}{2})$ that is congruent to $k\\cdot a$ modulo $p$. Let $\\nu$ be the number of negative numbers in the resulting set. Then $$ \\kr{a}{p} = (-1)^{\\nu}. $$"} {"_id": "31", "text": "If $x$ and $y$ are arbitrary integers, then $$ \\sum_{n=0}^{p-1} \\zeta^{(x-y)n} = \\begin{cases} p & \\text{\\rm if $x\\con y\\pmod{p}$},\\\\ 0 & \\text{\\rm otherwise}. \\end{cases} $$"} {"_id": "32", "text": "We have $g_0=0$."} {"_id": "33", "text": "For any integer $a$, $$ g_a = \\kr{a}{p}g_1. $$"} {"_id": "35", "text": "If~$n$ is divisible by a prime~$p\\con 3\\pmod{4}$, then~$n$ has no primitive representations."} {"_id": "36", "text": "If $x\\in\\R$ and $n\\in\\N$, then there is a fraction $\\ds\\frac{a}{b}$ in lowest terms such that $0