← All 70 questions
Question 15·St John's College·2025·One line once the right modulus is chosen — it discriminates on everything after that line: why mod 3 and mod 5 cannot work, what the exact nearest values of the form are, and whether the converse is stated or quietly assumed
Diophantine equations and modular arithmetic: shrinking infinitely many integer pairs to four residue classes, then checking which moduli actually carry the obstruction
5–8 minutes at interview pace
Live video, shared whiteboard. Everything under BOARD is written with the pen; everything under SAY is spoken over it, at the same time. Never write a line in silence, and never say a line you have not put on the board.
Prove that the equation x2+4y2=4643 has no solutions in integers.
Answer: No integer solutions: 4y2≡0 (mod 4) for every y, so the equation forces x2≡4643=4⋅1160+3≡3 (mod 4), while a square is 0 or 1 mod 4. Independently: 0 of the 137×69=9453 pairs with |x|≤68,|y|≤34 works; the closest values of the form are 4640=682+4⋅22 and 4645=632+4⋅132.

The whiteboard, beat by beat

1 · Orient · beat 1 of 7

Read it as set membership, and name the one pair that would kill it

S={x2+4y2: x,y∈ℤ}the claim is  4643∉S
x,y range over all of ℤ
kill criterion: ONE pair (x0,y0) with x02+4y02=4643
What you say, out loud

Before any technique, the shape of the claim. Run x and y over all the integers, form x squared plus four y squared, and you get a set of integers; the sentence on the board says that four thousand six hundred and forty three is not an element of it.

Writing it that way makes it falsifiable, and I want the falsification in front of me: one pair, one x and one y, and the statement is dead. So part of my time goes into hunting for that pair, not into building a proof.

It also rules out a whole family of attempts. There are infinitely many pairs, so no amount of checking, however diligent, ever finishes. Anything that works has to dispose of all of them at once, which means it has to be about a property of the shape of the left-hand side rather than about the size of x and y.

Why this beat exists: The interviewer is watching whether you turn a sentence of English into a quantified set-membership claim and name the refutation before attempting the proof.
2 · Set up the language · beat 2 of 7

Congruence is the machine that turns infinitely many integers into m boxes

a≡b (mod m)⟺m|(a−b),a≡a1, b≡b1 ⇒ a+b≡a1+b1, ab≡a1b1 (mod m)
Vm={x2+4y2 (mod m): x,y∈{0,1,…,m−1}},|Vm|≤m
4643 (mod m)∉Vm ⟹ 4643∉S(one finite table: m2 pairs)
What you say, out loud

The tool for handling infinitely many integers at once is congruence. Fix a modulus m: every integer falls into one of m boxes, and addition and multiplication respect the boxes, so which box x squared plus four y squared lands in is decided by which boxes x and y are in.

So for a fixed modulus the set of values the form can take is finite, at most m residues, and I can list them by checking m squared pairs. That list is the whole engine: if the residue of four thousand six hundred and forty three is not on the list, then the number itself is not a value of the form, and I am done.

Which modulus do I want? The one where the left-hand side gets simpler. The term four y squared is divisible by four for every y, not merely for even y, and that is the point: modulo four it disappears altogether and the whole form collapses to x squared. So four is the modulus to try, and I will check afterwards whether anything else works.

Why this beat exists: State the criterion before computing: a modulus m with the residue of n outside the value set. Candidates who "try a modulus" without saying what would make it succeed lose the room.
3 · First decisive move · beat 3 of 7

Reduce once: the 4y-squared term vanishes and only a square is left

4643=4⋅1160+3≡3 (mod 4)(4⋅1160=4640)
4y2=4⋅y2≡0 (mod 4)for EVERY y∈ℤ
equation ⇒ x2≡3 (mod 4)but x2 (mod 4)∈{0,1}
x^2 + 4y^2 reaches only 2 of the 4 boxesresidue class mod 4 of the left-hand side0x even1x odd2never3neverV_4 = {0, 1} (2 classes out of 4)4643 = 4*1160 + 3 = 3 (mod 4)3 is not in V_4 -> no pair (x, y) worksx mod 4 = 0, 1, 2, 3 -> x^2 mod 4 = 0, 1, 0, 14y^2 = 4*(y^2) is 0 mod 4 for every y, even or oddclasses, not sizes: no bound on x or y is used here
The four residue classes modulo 4. A square is congruent to 0 when its root is even and to 1 when its root is odd, and four times a square is congruent to 0 for every y, so the form x^2 + 4y^2 reaches exactly two of the four boxes — the value set V_4 has 2 elements out of 4. The printed number is 4*1160 + 3, that is 4640 + 3, so it sits in class 3, one of the two boxes the form never enters. Nothing in the picture depends on how large x or y is.
What you say, out loud

Reduce once. Four y squared is zero mod four, always, so the equation would force x squared to be congruent to four thousand six hundred and forty three mod four. And four times one thousand one hundred and sixty is four thousand six hundred and forty, so the number is four thousand six hundred and forty plus three: it lives in class three.

Now the four boxes on the board. A square lands in box zero when its root is even and in box one when its root is odd, and those are the only two boxes the form ever reaches. Box three, where the printed number sits, is empty of squares. That is the whole argument, and it is already a proof.

Notice what I have not done. I have not bounded x or y, not taken a square root, not tested a single pair. The reasoning is about which box a number is in, and boxes do not care how big the number behind them is. That is exactly the collapse the question is asking for: infinitely many pairs, four cases.

Why this beat exists: This is the beat where the method is announced before it is used: fix m, list the value set, compare. Naming the criterion first is what makes the next beat a computation rather than a guess.
4 · Execute · beat 4 of 7

The four cases in full, then the parity refinement that comes free

x (mod 4)0123x2 (mod 4)0101x2+4y2 (mod 4)0101
x=2k ⇒ x2=4k2≡0;x=2k+1 ⇒ x2=4k(k+1)+1≡1 (mod 4)
V4={0,1} ∋ x2+4y2 for all x,y∈ℤ4643≡3∉V4 ⇒ no solutions
4643 odd ⇒ x odd ⇒ x2≡1 (mod 8),4y2≡0 or 4 (mod 8)
⇒ x2+4y2≡1 or 5 (mod 8),4643=8⋅580+3≡3 (mod 8)
What you say, out loud

Let me write the case check out instead of asserting it. Every integer is either two k or two k plus one. If it is two k, its square is four k squared, zero mod four. If it is two k plus one, its square is four k squared plus four k plus one, that is four times k times k plus one, plus one. Two cases, and together they are all the integers, so this is not a sample, it is an exhaustion.

That gives the proof. For every pair the left-hand side is congruent to zero or one mod four; the right-hand side is congruent to three. Equal integers are congruent integers, so no pair of equal integers exists.

And one notch further, essentially for free, which also shows modulus four was not luck. The number is odd and four y squared is even, so x squared is odd, so x is odd. An odd square is one mod eight, because k times k plus one is even, so four times it is divisible by eight. Four y squared is zero or four mod eight according as y is even or odd. So the form is congruent to one or five mod eight, and four thousand six hundred and forty three is eight times five hundred and eighty plus three, class three again, still outside. The obstruction is real, not an artefact of the modulus I happened to pick.

Why this beat exists: The k(k+1) even step is what upgrades mod 4 to mod 8 without any new idea; saying it unprompted signals that the method is understood rather than recalled.
5 · Pin the exact value · beat 5 of 7

Exactly which moduli obstruct, and exactly how small each value set is

4643=4⋅1160+3=8⋅580+3=16⋅290+3(residue 3 at all three)
V4={0,1} (2 of 4),V8={0,1,4,5} (4 of 8),V16={0,1,4,5,8,9,13} (7 of 16)
|V32|=13 of 32
4643≡3 (mod 32)∉V32
m=4: smallest obstruction
V3={0,1,2},V5={0,1,…,4},V7={0,1,…,6}⇒mod 3,5,7 prove nothing
What you say, out loud

Before I trust the reduction I want the exact numbers, because the interesting claim is not just that modulus four works. It is that four is the smallest modulus that separates this number from the values of this form, and that some nearby moduli cannot separate them at all.

Four thousand six hundred and forty three is four times one thousand one hundred and sixty plus three, eight times five hundred and eighty plus three, sixteen times two hundred and ninety plus three, the residue three follows it up every power of two. The value sets shrink as fractions of the modulus: two residues out of four, four out of eight, seven out of sixteen, thirteen out of thirty two, and three is outside every one of them.

But mod three, mod five and mod seven are hopeless: the form takes every residue there. This is the trap in the question, and I want to name it out loud. Two is not a square mod three, so a hurried attempt says "x squared plus y squared is never two mod three" and stops, but four is one mod three, so four y squared is y squared, and one plus one is two. The congruence does have solutions mod three. Anyone who announces a proof modulo three or modulo five has made that mistake.

So the pinned facts are these: the obstruction is the residue class three mod four; it survives at moduli eight, sixteen and thirty two; and it fails at three, five and seven. That is a much stronger statement than "mod four works", and it cost only a few more tables.

Why this beat exists: Pin the exact objects: the smallest obstructing modulus is 4, and the value-set sizes are 2 of 4, 4 of 8, 7 of 16, 13 of 32. Saying that moduli 3, 5 and 7 are useless is what separates understanding the method from having recalled a trick.
6 · Test the claim · beat 6 of 7

The refutation hunt: an exhaustive search whose completeness I can prove

x2≤4643 ⇒ |x|≤68(682=4624≤4643<4761=692)
4y2≤4643, 4⋅1161=4644>4643 ⇒ y2≤1160<1225=352 ⇒ |y|≤34(342=1156)
137×69=9453 pairs ⇒ 0 solutions
closest approach: 4640=682+4⋅22 (gap 3),4645=632+4⋅132 (gap 2)
control box |x|≤75, |y|≤40
151×81=12231 points, still 0
the box every solution must lie in|x| <= 68: 68^2=4624 < 4761=69^2|y| <= 34: 4*34^2=4624 < 4900137 x 69 = 9453 pairs, integer testsolutions found: 0control box: 12231 points, 0dashed: x^2 + 4y^2 = 4643green: closest hits, 4640 and 464546374640464546494643: class 3, never hitgap 3gap 2only 4637, 4640, 4645, 4649 in 4636..4652min gap = 2
Left: the box is forced by exact squares, since 68^2 = 4624 is at most 4643 which is less than 4761 = 69^2, and 4*34^2 = 4624 is at most 4643 which is less than 4*35^2 = 4900. So all 137 by 69, that is 9453, candidate pairs are inside, and the dashed ellipse x^2 + 4y^2 = 4643 leaves the box through its sides at the irrational heights sqrt(19)/2 = 2.179449 and sqrt(19) = 4.358899 — it meets no lattice point anywhere. Right: the values of the form nearest 4643 are 4640 = 68^2 + 4*2^2 below and 4645 = 63^2 + 4*13^2 above; 4641, 4642 and 4644 are missed as well, so the least distance from 4643 to a value of the form is exactly 2.
What you say, out loud

Now a second route that shares no step with the first: I will reduce nothing and simply look, but I will make looking finite. If a solution exists then x squared is at most four thousand six hundred and forty three, and sixty eight squared is four thousand six hundred and twenty four while sixty nine squared is four thousand seven hundred and sixty one, so the size of x is at most sixty eight. Likewise four y squared is at most the same number; four times one thousand one hundred and sixty one is four thousand six hundred and forty four, already too big, so y squared is at most one thousand one hundred and sixty, thirty four squared is one thousand one hundred and fifty six and thirty five squared is one thousand two hundred and twenty five, so the size of y is at most thirty four.

That box is one hundred and thirty seven columns by sixty nine rows: nine thousand four hundred and fifty three pairs. Each one is settled by integer arithmetic alone, subtract four y squared, take the integer square root of what is left, square it back and compare. No rounding, no judgement call. The answer is zero solutions. Note what this route is for: it does not explain anything, it is the direct check of the claim, and if either route had a hole the two verdicts would not match.

The search also returns numbers the congruence never gives me. The closest the form gets from below is four thousand six hundred and forty, from sixty eight squared plus four times four, a gap of three. From above it is four thousand six hundred and forty five, sixty three squared plus four times one hundred and sixty nine, a gap of two. And the gap is not a coincidence of my modulus: four thousand six hundred and forty one, four thousand six hundred and forty two and four thousand six hundred and forty four are all missed too, so the least distance from four thousand six hundred and forty three to a value of the form is exactly two.

Two controls, because I do not want to trust my own box. I reran it on a deliberately wider frame, size of x up to seventy five and size of y up to forty, twelve thousand two hundred and thirty one points: still zero. And the boundary itself is clean, on the edge x equals sixty eight the equation wants y squared to be nineteen quarters, and on the edge y equals thirty four it wants x squared to be nineteen, and nineteen is not a square, so no lattice point on the rim of the box is even a near miss.

Why this beat exists: The two routes share no step: the congruence argument never bounds x or y, the search never reduces modulo anything. Cross-checking the verdicts is the point of the beat, not decoration.
7 · Conclude and generalise · beat 7 of 7

The answer, the exact family it sits in, and the two places the pattern breaks

x2+4y2=4643 has no integer solutions
obstruction: class 3 (mod 4)
S∩{n: n≡2 or 3 (mod 4)}=∅
n∈S⟺n≡0 or 1 (mod 4)
primes p≡3 (mod 4) to even power
21≡1 (mod 4) yet 21∉S
21, 17, 5 not squares
12≡0 (mod 4),12∉S
4643 prime: 19 trial divisions, primes to 67
x2+4y2=x2+(2y)2: a sum of two squares
4643=462+7⋅192(2116+2527)
What you say, out loud

The conclusion is the one I set out to test: the equation has no integer solutions, because the left-hand side is congruent to zero or one mod four for every pair and the right-hand side is congruent to three.

The same one line disposes of half of all integers at once: no number congruent to two or to three mod four is of the form x squared plus four y squared, ever. That is the generalisation the question is pointing at, and it is worth stating because it shows the argument was never about the digits of four thousand six hundred and forty three.

The converse is where I want to be careful rather than elegant. Is every number that passes the mod four test actually a value of the form? No. Twenty one is one mod four, and subtracting four times zero, one or four squared leaves twenty one, seventeen and five, none of them squares, so twenty one is missed, it is the smallest odd example, and twelve is the smallest even one. The exact criterion is the two squares one: n is a value if and only if n is zero or one mod four and every prime congruent to three mod four occurs to an even power in it. I checked that criterion against a brute-force sweep of the first four hundred positive integers and it agreed on every single one.

Two last things, both of which keep me honest about what did the work. Primality is not the reason: thirteen is prime and thirteen is a value of the form, three squared plus four times one squared. What matters is that four thousand six hundred and forty three is a prime congruent to three mod four, so it is not a sum of two squares at all, and four y squared is just the square of two y, so the form is a sum of two squares. And the coefficient four is doing most of the work: swap it for seven and the very same number is represented, forty six squared plus seven times nineteen squared, two thousand one hundred and sixteen plus two thousand five hundred and twenty seven. Same number, different form, opposite answer. That is the honest scope of the method.

Change the coefficient from four to seven and the answer flips: this very number is 46 squared plus 7 times 19 squared.

Why this beat exists: Close in order: the answer, the whole residue class the same line excludes, the exact criterion with its counterexamples 21 and 12, then the coefficient-sensitivity check that stops the method being over-generalised.

Where the interviewer pushes next

“You reached for modulus 4. Would modulus 3 or modulus 5 have worked — two is not a square mod 3, is it?”
What you say, out loud

No, and the reason is worth being precise about, because this is where the question separates people who ran a trick from people who understand it. Modulo three the term four y squared does not vanish: four is one mod three, so the form is x squared plus y squared, and one plus one is two. So the congruence does have solutions mod three, the value set is everything, all three residues.

Modulo five and modulo seven the same thing happens in a busier way: the form takes every residue, all five and all seven respectively. There is nothing to separate four thousand six hundred and forty three from the values of the form there.

Modulus four works for one structural reason: four divides the coefficient four, so the whole second term disappears and I am left asking whether three is a square. That is the design principle: choose the modulus that deletes the easiest term, then check that the surviving residue is a non-residue.

V3={0,1,2}, V5={0,1,…,4}, V7={0,1,…,6}⇒4643 is inside all three
4≡1 (mod 3) ⇒ x2+4y2≡x2+y2≡1+1≡2 (mod 3) is attained
4≡0 (mod 4) ⇒ term dies, leftover 3
“Is the converse true — is every integer that is 0 or 1 mod 4 of the form x squared plus four y squared?”
What you say, out loud

No. Twenty one is one mod four, and the only things to try are y equal to zero, one or two, which leave twenty one, seventeen and five as x squared. None is a square, so twenty one is not a value of the form. Twelve is the same story on the even side: y can only be zero or one, because four times two squared is already sixteen, too big, and both cases leave a non-square, twelve for y zero and eight for y one.

The real criterion is the two squares theorem wearing a hat. The form is x squared plus the square of two y, so a value is a sum of two squares with the even square automatically divisible by four. A number is a sum of two squares exactly when every prime congruent to three mod four occurs to an even power, and then the extra condition is just that the number is not two mod four, because if it is odd one summand is even and if it is zero mod four I can divide the four out.

So the answer is: n is a value if and only if n is zero or one mod four and every prime three mod four has even exponent in n. I tested that against an exhaustive sweep of the first four hundred positive integers and there was no disagreement at all, but I would not state it as a guess, and I would not state the weaker mod four condition as if it were the answer.

21≡1 (mod 4),  21−4⋅0=21,  21−4⋅1=17,  21−4⋅4=5none square ⇒ 21∉S
12≡0 (mod 4),  12∉S;13=32+4⋅12∈S,  5=12+4⋅12∈S
criterion: n≡0,1 (mod 4)
and all p≡3 (mod 4) have even vp(n)
checked for 1≤n≤400
“Keep the method, change the number: what is the smallest change to 4643 that makes the equation soluble?”
What you say, out loud

The congruence and the search answer different halves of this, which is why I ran both. A change of one downward gives four thousand six hundred and forty two, which is two mod four, and the same one-line argument kills it. A change of one upward gives four thousand six hundred and forty four, which is zero mod four, it passes the congruence test, and the exhaustive search says it is still not a value of the form, and so is four thousand six hundred and forty one.

So the smallest change is not one, and it is not three down either. Downward the first hit is four thousand six hundred and forty, which is sixty eight squared plus four times two squared, four thousand six hundred and twenty four plus sixteen: a change of minus three. Upward the first hit is four thousand six hundred and forty five, which is sixty three squared plus four times thirteen squared, three thousand nine hundred and sixty nine plus six hundred and seventy six: a change of plus two.

So the least change that makes it soluble is two, upward. And I would flag what that number means: the mod four obstruction alone only guarantees a gap of at least one, because it excludes classes two and three; the extra work at four thousand six hundred and forty one and forty four is not congruence information at all, it is the two squares criterion biting. Two different reasons, and only the search shows me both.

4642≡2,  4643≡3 (mod 4)
⇒ excluded
4641, 4644≡1,0 (mod 4), yet∉S
4640=682+4⋅22∈S (Δ=−3),4645=632+4⋅132∈S (Δ=+2)
min⁡{|n−4643|: n∈S}=2

Traps on this question

  • Dividing the equation by 4 to get "x squared over four plus y squared equals 1160.75" and reading something off it. That step assumes x is even, and in fact x must be odd here: x squared equals four thousand six hundred and forty three minus four y squared, an odd number. A fraction on the board is not a congruence, and it proves nothing.
  • Announcing a proof modulo three because two is not a square mod three. Four is one mod three, so the form is x squared plus y squared there, and one plus one is two: the congruence is soluble mod three, and mod five and mod seven it is soluble for every residue. The value sets are all of the ring, so those moduli cannot possibly disprove anything.
  • Claiming the reason is parity — the left-hand side and the right-hand side have different parity. They do not: four y squared is even and x squared is odd when x is odd, so the form does take odd values, for instance five equals one squared plus four times one squared. The obstruction is the residue class three mod four, which is strictly sharper than oddness.
  • Believing the converse and reporting a classification of the form "it works exactly when the number is zero or one mod four". Twenty one and twelve pass that test and are not values of the form; the true criterion also needs every prime congruent to three mod four to occur to an even exponent.
  • Taking the search bound from a calculator. The square root of four thousand six hundred and forty three prints as sixty eight point one three nine five six three, and a rounding slip there would silently shrink or inflate the box and make the exhaustion claim false. The bound has to be the exact integer sandwich: sixty eight squared is four thousand six hundred and twenty four, which is at most four thousand six hundred and forty three, which is less than four thousand seven hundred and sixty one, which is sixty nine squared.

What gets written on the assessor’s form

  • Converted the prose into a set-membership claim and stated, before proving anything, the single pair that would have refuted it.
  • Chose the modulus for a reason — four divides the coefficient, so the second term vanishes — and then checked which moduli do not work instead of assuming any modulus would.
  • Gave the exhaustion in two algebraic cases (x equals 2k, x equals 2k plus one) rather than by pointing at a table, and upgraded it to mod eight using k(k+1) even.
  • Backed the congruence with a genuinely independent exhaustive search, derived the box from exact squares rather than decimals, and reported the closest approach 4640 and 4645 with witnesses.
  • Stated the general family without overclaiming it: half of all integers excluded by the same line, the two-squares criterion for the rest, and the counterexamples 21 and 12 to the converse.