Skip to content
The Lumenary

Each worksheet prints cleanly on A4 or Letter. Answer keys are on a separate page.

The Lumenary · Advanced undergraduate

Number theory

Name: ______________________

Date: ______________________

You will learn to

  • Prove that (Z/pZ)×(\Z/p\Z)^\times is cyclic for pp prime, find primitive roots, and determine which moduli have them
  • Prove Euler's criterion and the law of quadratic reciprocity, and compute Legendre symbols with them
  • Use Dirichlet convolution and Möbius inversion to work with arithmetic functions
  • Characterise the primes that are sums of two squares
  • Prove that Pell's equation x2−dy2=1x^2 - dy^2 = 1 has infinitely many solutions, all generated by one, and find it with continued fractions
  1. 1.

    How many primitive roots are there modulo 1313?

  2. 2.

    Use quadratic reciprocity to compute the Legendre symbol (37101)\left(\frac{37}{101}\right). (Enter 11 or −1-1.)

  3. 3.

    For which moduli nn does a primitive root exist? (Select all that apply.)

    • A.n=9n = 9
    • B.n=8n = 8
    • C.n=18n = 18
    • D.n=15n = 15
    • E.n=50n = 50
    • F.n=12n = 12
  4. 4.

    Which of these numbers are sums of two squares of integers? (Select all that apply.)

    • A.2929
    • B.3131
    • C.6565
    • D.2121
    • E.4545
  5. 5.

    In the proof of Euler's criterion, let gg be a primitive root modulo an odd prime pp and a=gka = g^k. Why is a(p−1)/2≡1a^{(p-1)/2} \equiv 1 exactly when kk is even?

    • A.a(p−1)/2=gk(p−1)/2a^{(p-1)/2} = g^{k(p-1)/2}, which is 11 iff p−1p - 1 divides k(p−1)/2k(p-1)/2, i.e. iff kk is even.
    • B.Because ap−1≡1a^{p-1} \equiv 1 by Fermat's little theorem.
    • C.Because g(p−1)/2≡1g^{(p-1)/2} \equiv 1.
    • D.Because every even number is a square.
  6. 6.

    Compute ∑d∣60μ(d)\sum_{d \mid 60} \mu(d), where μ\mu is the Möbius function.

  7. 7.

    The fundamental solution of x2−2y2=1x^2 - 2y^2 = 1 is (3,2)(3, 2). Using composition, (x+y2)=(3+22)2(x + y\sqrt2) = (3 + 2\sqrt2)^2, find the next solution. What is its xx?

  8. 8.

    In Lean, legendreSym p a is the Legendre symbol (ap)\left(\frac{a}{p}\right). Which statement is the law of quadratic reciprocity for primes p, q (with [Fact p.Prime] [Fact q.Prime])?

    • A.p ≠ 2 → q ≠ 2 → p ≠ q → legendreSym q p * legendreSym p q = (-1) ^ (p / 2 * (q / 2))
    • B.legendreSym q p * legendreSym p q = (-1) ^ (p / 2 * (q / 2))
    • C.p ≠ 2 → q ≠ 2 → p ≠ q → legendreSym q p = legendreSym p q
    • D.p ≠ 2 → q ≠ 2 → p ≠ q → legendreSym q p * legendreSym p q = (-1) ^ (p * q / 4)
  9. 9.

    Write order(a, n) returning the multiplicative order of aa modulo nn (assume gcd⁡(a,n)=1\gcd(a, n) = 1, n≥2n \ge 2), and primitive_roots(p) returning the sorted list of primitive roots modulo a prime pp. Check that there are φ(p−1)\varphi(p - 1) of them.

    Computational — Practice

Code: Apache-2.0 · Content: CC BY-SA 4.0