1. EachPod

OEIS A000224: Number of Squares Mod N

Author
Mike Breault
Published
Thu 15 May 2025
Episode Link
None

Explore A000224, the number of distinct quadratic residues modulo N (including 0). For N = 10, the residues are {0, 1, 4, 5, 6, 9}, so A(10) = 6. In general A(N) < N for N > 2, so not every residue is achieved. The sequence is multiplicative: if gcd(m, n) = 1 then A(mn) = A(m)A(n); this lets you compute A(N) from prime powers. There are explicit formulas for prime powers: for 2^e the value depends on the parity of e; for odd primes p^e there are closed forms; in particular A(p) = (p + 1)/2 for odd prime p. A conjecture by Thomas Wadowski states N^2 ≡ 1 mod (A(N)A(N−1)) iff N is an odd prime, verified up to large computational bounds. The page also links to related sequences counting higher power residues (cubes, fourth powers) and to code you can run to compute A(N) directly or via multiplicativity. This simple counting question touches modular arithmetic, primality, and cryptography, and serves as a nice entry point for students learning number theory.


Note: This podcast was AI-generated, and sometimes AI can make mistakes. Please double-check any critical information.

Sponsored by Embersilk LLC

Share to: