← 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 5

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 5

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)
4643≢x2+4y2 (mod m) for all x,y ⟹ 4643∉S
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 there are only finitely many residues the form can take, and I can check them. If the residue of four thousand six hundred and forty three is not among them, 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 5

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 5

The four cases in full

x (mod 4)0123x2 (mod 4)0101x2+4y2 (mod 4)0101
x=2k ⇒ x2≡0;x=2k+1 ⇒ x2=4k(k+1)+1≡1 (mod 4)
V4={0,1} ∋ x2+4y2 for all x,y∈ℤ4643≡3 (mod 4)∉V4
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.

Why this beat exists: The two cases are exhaustive by construction, every integer is two k or two k plus one, so the table is a proof and not a sample. Naming why the split covers every integer is the move the interviewer is listening for.
5 · Conclude · beat 5 of 5

The answer, and the class of integers the same line excludes

x2+4y2=4643 has no integer solutions
S∩{n: n≡2 or 3 (mod 4)}=∅
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 zero or one mod four for every pair and the right-hand side is three.

The same line excludes half of all integers: no number that is two or three mod four is ever a value of this form. That is the whole answer to the question. Everything else I can say about the problem is follow-up material, and it belongs after the answer, not inside it.

Why this beat exists: The answer ends here. The rest of the page is follow-up material, deployed only if the interviewer asks; delivering this and then stopping is the interview move.

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.

And four is not just a lucky pick. The number sits in class three at modulus eight, sixteen and thirty two as well, and the value set misses class three at every one of them: two residues out of four, four out of eight, seven out of sixteen, thirteen out of thirty two. At modulus eight the reason is the same two-case check one level up: an odd square is one, because its square is one more than four times k times k plus one and that product is even; four y squared is zero or four; so the form is one or five, and the number is three. Modulus two is the only smaller case, and it cannot separate: the value set is zero or one, and the number is one, so its residue is inside. So four is the smallest modulus above one that separates the number from the form.

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.

Vm={x2+4y2 (mod m)}
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
V2={0,1},4643≡1∈V2(no exclusion)
4≡0 (mod 4) ⇒ term dies, leftover 3
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
x2+4y2≡1 or 5 (mod 8),4643≡3 (mod 8)
“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 non-negative integer 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 for a non-negative integer n, 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 for n≥0: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
“How would you convince me the answer is right, without using the congruence at all?”
What you say, out loud

Without congruences the search is still finite. A solution forces x squared to be at most four thousand six hundred and forty three, so the size of x is at most sixty eight; four y squared is at most the same, so the size of y is at most thirty four. That is one hundred and thirty seven values of x and sixty nine values of y, nine thousand four hundred and fifty three pairs, and each pair is settled by integer arithmetic alone: subtract four y squared, take the integer square root, square it back and compare.

I would not grind through nine thousand pairs by hand in an interview, and I would say that plainly. The proof is the mod four line; this is a check, not a proof. What this route gives is a finite, auditable check that shares no step with the congruence, so a machine can run it and I can state exactly what was run: nine thousand four hundred and fifty three pairs, zero solutions.

Two controls. A deliberately wider frame, the size of x up to seventy five and the size of y up to forty, twelve thousand two hundred and thirty one points, still zero. And the rim of the box is clean: on the edge x equals sixty eight the equation would need y squared to be nineteen quarters, and on the edge y equals thirty four it would need x squared to be nineteen, which is not a square, so neither edge of the box contains an exact integer solution.

x2≤4643⇒|x|≤68,4y2≤4643⇒|y|≤34
137×69=9453 pairs ⇒ 0 solutions
control box |x|≤75, |y|≤40: 151×81=12231 points, still 0
“Does the argument depend on four, or would any coefficient do?”
What you say, out loud

It depends on four in one place: four y squared is divisible by four, so the second term vanishes mod four. That is a property of the coefficient, not of the proof. Swap four 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, so the answer flips.

Primality is not the reason either. Thirteen is prime and it 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 prime, which I check by trial division against the primes up to sixty seven, and it is congruent to three mod four, so it is not a sum of two squares at all, while x squared plus four y squared is x squared plus the square of two y, a sum of two squares.

So the honest scope is narrow: this modulus works because four divides the coefficient and the number sits in class three. It is one modulus and one residue class, not a theory of the whole form.

4643=462+7⋅192(2116+2527)
x2+4y2=x2+(2y)2: a sum of two squares
4643<69:no prime factor≤67
4643 prime≡3 (mod 4) ⇒ 4643≠x2+y2

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.