Number Theory

Primes, divisibility, congruences and the deep patterns in the whole numbers. 59 articles.

Divisibility and factors

What Number Theory Studies and Why It Fascinates PeopleA tour of number theory: divisibility, primes, remainders and whole-number equations, and why simple questions here can be so hard.The Euclidean Algorithm for Greatest Common Divisors, Step by StepLearn to find any greatest common divisor by repeated division, with worked examples, a proof that it works and the reason it is fast.Why Every Whole Number Factors Into Primes in Only One WayFollow both halves of the fundamental theorem of arithmetic, why prime factorizations exist and why no number can have two different ones.Least Common Multiples and Where They Show UpFind least common multiples three ways and see them at work in fractions, timetables, gears, calendars and repeating cycles.Bezout's Identity and the Extended Euclidean AlgorithmSee why a greatest common divisor is always a combination of the two numbers, and compute the coefficients with a simple table method.Perfect Numbers and Their Link to Mersenne PrimesLearn what makes a number perfect, why every even one comes from a Mersenne prime, and which questions about them are still unanswered.Amicable Numbers and Sociable ChainsMeet pairs and loops of numbers whose divisors add up to one another, with checked examples, a classic generating rule and open questions.Egyptian Fractions and the Greedy Method for Finding ThemWrite any proper fraction as a sum of different unit fractions, see why the greedy method always finishes, and learn where it goes astray.Which Numbers Are Sums of Consecutive Integers?Find out which numbers are sums of consecutive positive integers, why powers of 2 never are, and how to count every possible way.How to Count the Divisors of a Number From Its Prime FactorsAdd one to each exponent and multiply: learn why the rule works, how to list and add divisors, and which puzzles it solves at once.Where Unique Factorization Fails and Why That MatteredSee how 6 factors in two different ways once √−5 is allowed, and how repairing that failure led to ideals and modern algebra.

Prime numbers

Prime Numbers Explained From the Ground UpUnderstand what primes are, how to test a number by hand, why they are the building blocks of arithmetic and what remains unknown.Euclid's Proof That the Primes Never EndWalk through the classic argument that there are infinitely many primes, clear up the usual misreading and compare other proofs.The Sieve of Eratosthenes and How to Use ItFind every prime up to a limit by crossing out multiples, with a worked grid to 100, the reasons for each shortcut and a short program.Why 1 Is Not a Prime NumberLearn why mathematicians exclude 1 from the primes, how the choice protects unique factorization and why the rule has not always held.The Prime Number Theorem and How Primes Thin OutLearn how fast the primes thin out, what x divided by ln x really predicts, and why a proof took about a century of work.Prime Gaps, Why the Primes Can Be Close Together or Far ApartSee why prime gaps can be as small as 2 or as large as you like, what has been proved, and which questions remain open.Mersenne Primes and Why the Biggest Known Primes Take This FormFind out what Mersenne primes are, how the Lucas-Lehmer test checks them so quickly, and why record primes usually look like 2^p minus 1.Fermat Primes and the Constructible PolygonsDiscover why only five Fermat primes are known and how they decide which regular polygons a compass and straightedge can build.How to Test Whether a Large Number Is PrimeWork through trial division, the Fermat test and certificate methods, with checked examples showing which tool fits which size of number.The Miller-Rabin Test and Probably Prime NumbersLearn the Miller-Rabin primality test step by step, with checked examples and a clear account of what probably prime really means.Why Integer Factoring Is So Much Harder Than Primality TestingUnderstand how you can know a number is composite without knowing its factors, and why that gap in difficulty matters for security.Dirichlet's Theorem on Primes in Arithmetic ProgressionsSee why sequences like 4, 7 or 100 apart contain endless primes, with easy cases proved and the idea behind the full proof.The Ulam Spiral and the Visual Puzzle of PrimesDraw the Ulam spiral, learn why primes line up on its diagonals, and see which parts of the pattern are explained and which are not.

Congruences

How to Solve Linear CongruencesFollow a clear method for solving ax ≡ b mod m, including when no solution exists and when there are several, with checked examples.Fermat's Little Theorem With Proof and UsesUnderstand why a to the power p minus 1 leaves remainder 1 modulo a prime, with two proofs, worked uses and a warning about the converse.Euler's Theorem and the Totient FunctionCompute the totient function, prove Euler's theorem and see how it tames huge powers and makes a small RSA example work.Wilson's Theorem and Its Short ProofProve that (p − 1)! leaves remainder −1 exactly when p is prime, see the pairing trick in action and learn what the result is good for.The Chinese Remainder Theorem and How to Apply ItCombine remainder conditions into one answer, with two solving methods, a rule for moduli that share factors and practical applications.Quadratic Residues and the Legendre SymbolLearn which remainders are squares modulo a prime, how Euler's criterion and the Legendre symbol decide it, and how to compute quickly.Quadratic Reciprocity, Gauss's Golden TheoremLearn what the law of quadratic reciprocity says, use it to test squares modulo a prime, and see the lattice-point idea behind a proof.Primitive Roots and the Discrete LogarithmFind generators modulo a prime, read exponents backward as discrete logarithms, and see why that reversal matters in cryptography.Check Digits, How Modular Arithmetic Catches Typing ErrorsWork through the check digits on barcodes, books, cards and bank accounts, and learn which typing mistakes each scheme can and cannot catch.How to Find the Last Digits of an Enormous PowerUse cycles, repeated squaring, Euler's theorem and the Chinese remainder theorem to get the final digits of huge powers by hand.

Diophantine equations

Diophantine Equations and the Search for Whole-Number SolutionsMeet equations that demand whole-number answers, learn the main tools for solving them or ruling them out, and see why no method covers all.Pythagorean Triples and How to Generate All of ThemBuild every whole-number right triangle from two parameters, understand why the formula misses nothing, and explore its surprising patterns.Pell's Equation and Its Surprisingly Large SolutionsSolve x² − Ny² = 1 with continued fractions and composition, and see why some small values of N force enormous first solutions.Fermat's Method of Infinite DescentLearn how a proof by ever-smaller solutions works, with full examples from √2 to Fermat's fourth-power theorem and Vieta jumping.Which Numbers Are Sums of Two Squares?Apply the prime factor test for writing a number as a² + b², see why it works, and count how many ways each number can be written.Lagrange's Four-Square Theorem ExplainedUnderstand why every whole number is a sum of four squares, follow the proof in three moves, and see what happens with fewer squares.Waring's Problem and Writing Numbers as Sums of PowersSee how many cubes or fourth powers it takes to build any number, why a few small cases need extra terms, and what is still unknown.Elliptic Curves Introduced for Curious ReadersSee what an elliptic curve is, how two points add to give a third, and why this one structure matters for number theory and secure codes.The Frobenius Coin Problem and the Chicken Nugget QuestionFind the largest total you cannot make from given coin values or box sizes, with proofs for two sizes and a clean method for three.

Special numbers and sequences

The Fibonacci Numbers and Their Hidden Divisibility PatternsDiscover which Fibonacci numbers divide which, why remainders repeat in cycles, and what is still unknown about primes in the sequence.The Golden Ratio, What Is True About It and What Is MythSeparate the proven mathematics of the golden ratio from popular claims about temples, shells and beauty, and learn how to test them.The Number e and Why It Appears Wherever Growth DoesSee where e ≈ 2.71828 comes from, why e to the x is its own rate of change, and how it governs growth, decay and chance.What Pi Is and How We Know It Is IrrationalLearn what π measures, how it was pinned down, and follow a complete short proof that no fraction can ever equal it.Continued Fractions and the Best Rational ApproximationsBuild continued fractions by hand and see why they deliver the best simple fractions for π, √2, calendars and musical tuning.Pascal's Triangle and the Patterns Inside ItBuild Pascal's triangle with simple addition, then find powers of 2, Fibonacci numbers, primes and a fractal inside it.Figurate Numbers, From Triangles to Squares and BeyondArrange dots into triangles, squares, pentagons and pyramids, and learn the formulas and theorems that these shapes reveal.Catalan Numbers and the Many Things They CountMeet the sequence 1, 1, 2, 5, 14, 42, see why it counts brackets, paths and triangulations, and derive its formula.Integer Partitions and the Work of Hardy and RamanujanCount the ways to write a number as a sum, then see Euler's recursion, Hardy and Ramanujan's estimate and striking congruences.

Branches of modern number theory