Whenever a number theory problem arrives with an unknown n floating around — "find the sum of the first n positive integers," "show n^3 - n is divisible by 6," "how many pairs (a, b) satisfy a + b = n" — the single most powerful first move is to try small cases. Plug in n = 1, n = 2, n = 3, n = 4. Write out what happens. Look for the pattern.

This is not cheating or lazy. It is the working habit of every professional mathematician I know. The pattern that emerges from small cases often is the answer, and the algebra at the end just formalises what you already saw.

Why n = 4 is usually enough

The folklore rule is: by n = 4, the pattern almost always announces itself. Here is why four cases is usually the right number.

More than four cases can be useful for combinatorial problems (sometimes up to n = 6 or so), but four is the default budget. Past that, you should usually have a conjecture worth proving.

A classic example: sum of the first n cubes

Consider the sum

S(n) = 1^3 + 2^3 + 3^3 + \cdots + n^3.

If you had never seen this before, what would you do? Not algebra yet. First, just compute:

Stare at the list: 1, 9, 36, 100. Do you recognise these? They are 1^2, 3^2, 6^2, 10^2 — the squares of the triangular numbers 1, 3, 6, 10. And triangular numbers have the formula T_n = n(n+1)/2.

Conjecture: S(n) = \left(\dfrac{n(n+1)}{2}\right)^2. Check at n = 5: formula gives 225; brute sum gives 1+8+27+64+125 = 225. ✓

Now — and only now — do you go prove it by induction. The algebra is the last 20\% of the work; the pattern recognition at the start is the other 80\%.

Interactive: watch a pattern emerge in four steps

Summing cubes from n equals one to five reveals squares of triangular numbersA slider moves across n equals 1 through 5. For each n the display shows the partial sum of cubes from 1 to n cubed, and underneath reveals that each partial sum equals the square of the triangular number. The pattern becomes visible by n equals 3 and is confirmed by n equals 4. Partial sum $1^3 + 2^3 + \cdots + n^3$ Pattern: $S(n) = \bigl(n(n+1)/2\bigr)^2$ — visible once you compute four cases.
Drag the slider through $n = 1, 2, 3, 4, 5$. By $n = 3$ the square-of-triangular-number pattern is already visible. By $n = 4$ it is nailed. The fifth case is a confirmation, not a discovery.

Three more miniatures

Let's see small-case testing in action on problems you actually get asked.

Problem A. Prove n^3 - n is divisible by 6 for every positive integer n.

Before proving, compute:

n n^3 - n \div 6?
1 0 0
2 6 1
3 24 4
4 60 10

Every case yields a multiple of 6. More: you now notice n^3 - n = n(n-1)(n+1), which is three consecutive integers. Among any three consecutive integers, one is a multiple of 3 and at least one is even. So the product is a multiple of 2 \cdot 3 = 6. Done.

The pattern isn't visible in algebra first; it's visible in the list of values. Once you factor after computing, the structure emerges.

Problem B. Find \sum_{k=1}^n (2k - 1), i.e., the sum of the first n odd numbers.

Compute:

n Sum
1 1
2 1 + 3 = 4
3 1 + 3 + 5 = 9
4 1 + 3 + 5 + 7 = 16

The sums are 1, 4, 9, 16 — perfect squares. Conjecture: the sum equals n^2. Confirmed at n = 5: 1+3+5+7+9 = 25 = 5^2. ✓ Now prove by induction (or geometrically: an n \times n square can be tiled by L-shaped gnomons of sizes 1, 3, 5, \ldots, 2n-1).

Problem C. Prove that n^2 + n is always even.

Compute: 2, 6, 12, 20, 30, \ldots All even. Factor: n^2 + n = n(n+1), and any two consecutive integers include one even number, so the product is even. The tiny numerical check confirms your conjecture and suggests the factoring.

The deeper reason: patterns live in small cases

Why does this work so often? Because number theory is built on local structure: divisibility rules, prime factorisations, modular residues. These local features are visible in small numbers. Whether a formula is linear, quadratic, or cubic in n — whether a sequence grows, repeats, or cycles — you can tell from four values.

In contrast, analytic patterns (things involving \log n or \sqrt n) usually become visible only at larger n. Number theory is mercifully small-data friendly.

When small cases mislead you

A healthy caution: sometimes small cases lie. A pattern that holds for n \leq 10 can break at n = 11. Famous example: define f(n) = the smallest prime factor of n^2 + n + 41. For n = 0, 1, 2, \ldots, 39, n^2 + n + 41 is always prime. But at n = 40, 40^2 + 40 + 41 = 1681 = 41^2 — composite.

So small cases generate conjectures, not proofs. The conjecture is only nailed when you can show it algebraically. But finding the right thing to nail is the hardest part, and small cases give it to you nearly for free.

Drill: make the habit automatic

A cheap way to build the habit: on every problem involving n, before reading any further, write down the values for n = 1, 2, 3, 4 at the top of your scratch paper. Do this for a week. The reflex internalises fast — and once it does, you never again stare helplessly at an unfamiliar problem.

One-line takeaway

Compute n = 1, 2, 3, 4 first. The pattern almost always reveals itself by the fourth case. Small cases turn an unknown problem into a familiar one, and give the algebra something specific to confirm. Clever algebra should be the last step, not the first.

Related: Number Theory Basics · Factor Into Primes First · Switch to Mod 10 for Last-Digit Problems · gcd = 1 Unlocks Bézout and Inverses · "Smallest n Divisible by …" Is LCM