Skip to main content

Maths interview questions: 12 practice problems with solutions

12 original problems in the style of a university maths interview, from warm-ups to stretch problems. Each has two hints, a full solution, what an interviewer listens for and a follow-up question, because in a real interview the first answer is rarely the end.

How to use them

  1. Out loud. Work on paper or a whiteboard and say what you are thinking, as you would in an interview. Better still, ask a teacher or friend to listen.
  2. About 15 minutes each before you open a hint. Open hint 1, try again, then hint 2.
  3. Then the follow-up. Interviewers usually push further once you finish; the follow-up questions have no published solutions, like a real interview.

Warm-up problems

1. Sketch a rational function

Sketch the graph of y=x2−1x2+3. For which values of k does the equation x2−1x2+3=k have exactly two real solutions?

Hint 1

Is the function odd, even or neither? What happens when x is large?

Hint 2

Write x2−1x2+3 as 1−somethingx2+3.

Full solution

Answer: Two solutions exactly when −13<k<1.

Replacing x by −x changes nothing, so the graph is symmetric about the y-axis. It crosses the x-axis at x=±1 and the y-axis at y=−13.

Write y=1−4x2+3. As x2 grows from 0, the fraction 4x2+3 falls from 43 towards 0, so y rises from −13 towards 1 and never reaches it. The minimum is (0,−13), there is no other turning point, and y=1 is a horizontal asymptote approached from below on both sides. The range is −13≤y<1.

A horizontal line y=k meets this graph twice exactly when −13<k<1; once when k=−13 (at x=0); and not at all otherwise.

What the interviewer listens for: Say what you are checking before you draw: symmetry, intercepts, behaviour for large x. Rewriting the fraction is the step that turns guesswork into an argument; say why the range stops short of 1.

Follow-up question: How does the picture change for y=x2−1x2−3?

2. Divisibility without a calculator

For which positive integers n is n2+3n+7 divisible by 5? Show that it is never even, and never a multiple of 3.

Hint 1

Only the remainder of n on division by 5 matters. How many cases is that?

Hint 2

n2+3n=n(n+3). What can you say about n and n+3? For 3, compare n2+3n+7 with n2+1.

Full solution

Answer: n≡3 or 4(mod5); always odd; never a multiple of 3.

Work modulo 5: try n≡0,1,2,3,4. The values of n2+3n+7 are 7,11,17,25,35, with remainders 2,1,2,0,0. So it is divisible by 5 exactly when n leaves remainder 3 or 4 on division by 5.

n2+3n=n(n+3), and n and n+3 have opposite parity, so one of them is even and n(n+3) is even. Adding 7 makes the total odd.

Modulo 3, 3n≡0 and 7≡1, so n2+3n+7≡n2+1. A square leaves remainder 0 or 1 on division by 3, so n2+1 leaves 1 or 2: never 0.

What the interviewer listens for: Reducing an infinite question to a few cases is the key idea; say it out loud. Checking small n first is fine, as long as you then explain why the pattern must continue.

Follow-up question: Is there an n for which n2+3n+7 is divisible by 25? By 125?

3. A minimum without calculus

Show that x+9x≥6 for every positive real x. Hence find the least value of x2+2x+9x for x>0. What happens for x<0?

Hint 1

Multiply through by x (why is that allowed?) and look for a square.

Hint 2

x2+2x+9x=x+2+9x.

Full solution

Answer: Least value 8 at x=3; for x<0 the greatest value is −4 at x=−3.

For x>0, multiplying by x keeps the inequality the same way round: x+9x≥6⟺x2−6x+9≥0⟺(x−3)2≥0, which is true, with equality only at x=3.

So x2+2x+9x=x+2+9x≥8 for x>0, with equality at x=3: the least value is 8.

For x<0, put x=−t with t>0: x+2+9x=2−(t+9t)≤2−6=−4. So on the negative side the expression is at most −4, reached at x=−3, and there is no least value (it tends to −∞ as x→0−).

What the interviewer listens for: Notice the condition x > 0 and say where you use it. Completing the square, AM-GM and calculus all work; naming more than one route is a plus.

Follow-up question: Find the least value of x+9x2 for x>0 without calculus.

Core problems

4. A recurrence and a remainder

A sequence has u1=5 and un+1=3un−2. Find a formula for un and prove it. For which n is un a multiple of 7?

Hint 1

Write out the first few terms and subtract 1 from each.

Hint 2

Powers of 3 repeat their remainders on division by 7. How long is the cycle?

Full solution

Answer: un=1+4⋅3n−1; a multiple of 7 exactly when 6∣n.

The terms are 5,13,37,109,…; subtracting 1 gives 4,12,36,108, which multiply by 3 each time. So guess un=1+4⋅3n−1.

Proof by induction: true for n=1 since 1+4=5. If uk=1+4⋅3k−1, then uk+1=3(1+4⋅3k−1)−2=1+4⋅3k, which is the formula for n=k+1.

(Another route: un+1−1=3(un−1), so un−1 is geometric with ratio 3.)

7∣un means 4⋅3n−1≡−1≡6(mod7). Multiply by 2 (since 2⋅4=8≡1): 3n−1≡12≡5(mod7). The powers 30,31,… leave remainders 1,3,2,6,4,5 and then repeat with period 6, so 3n−1≡5 exactly when n−1≡5(mod6), that is, when n is a multiple of 6. Check: u6=1+4⋅243=973=7×139.

What the interviewer listens for: Spotting the pattern is not enough; the interviewer wants to hear why it holds (induction, or the substitution v = u - 1). For the remainder part, organising the powers of 3 in a table is a good habit.

Follow-up question: Which recurrences un+1=aun+b have a closed form like this? What goes wrong when a=1?

5. An integral you can do without integrating

Find ∫02x3x3+(2−x)3dx.

Hint 1

Call the integrand f(x). What is f(2−x)?

Hint 2

What is f(x)+f(2−x)? What does the substitution u=2−x do to the integral?

Full solution

Answer: 1

First check the integrand is defined on [0,2]: x3+(2−x)3=6x2−12x+8=6(x−1)2+2>0.

Let f(x)=x3x3+(2−x)3. Then f(2−x)=(2−x)3(2−x)3+x3, so f(x)+f(2−x)=1.

Let I=∫02f(x)dx. The substitution u=2−x gives I=∫02f(2−u)du. Adding the two forms, 2I=∫02(f(x)+f(2−x))dx=∫021dx=2, so I=1.

A picture says the same: the graph of f is symmetric under a half-turn about (1,12), so the area under it is half the area of the 2×1 rectangle.

What the interviewer listens for: Many candidates start expanding. It is fine to try that briefly and say it looks messy, then look for structure. Checking the denominator is never zero shows care.

Follow-up question: Show that ∫0ag(x)g(x)+g(a−x)dx=a2 whenever the denominator is never zero. Can you invent another integral this does?

6. The largest of three dice

Three fair six-sided dice are rolled. What is the probability that the largest number showing is 4? Which value of the largest number is most likely?

Hint 1

Find the probability that all three dice show at most 4.

Hint 2

'Largest is exactly 4' = 'all at most 4' minus 'all at most 3'.

Full solution

Answer: 37216; the most likely largest value is 6.

All three dice show at most k with probability (k6)3=k3216. The largest is exactly k when all are at most k but not all at most k−1, so

P(largest=k)=k3−(k−1)3216.

For k=4: 64−27216=37216.

k3−(k−1)3=3k2−3k+1 increases with k, so the most likely largest value is 6, with probability 91216.

What the interviewer listens for: Counting the outcomes with largest exactly 4 directly is possible but error-prone; the complement-style trick is what they hope you find, perhaps after a hint. Sanity-check: the six probabilities should add to 1.

Follow-up question: What is the probability that the smallest number showing is 4? What is the expected value of the largest?

7. Numbers with increasing digits

Count the five-digit numbers, such as 13579, in which each digit is bigger than the one before it. Then count those, such as 11349, in which no digit is smaller than the one before it.

Hint 1

Can 0 appear? Once you choose which digits appear, how many ways are there to order them?

Hint 2

For 'never decrease', think of placing five identical counters into nine boxes labelled 1 to 9.

Full solution

Answer: 126 and 1287.

A 0 could only be the first digit, which is not allowed, so the digits come from 1 to 9.

Strictly increasing: choose any 5 different digits from the 9; there is exactly one increasing order. That is (95)=126.

Never decreasing: the number is fixed by how many times each digit 1,…,9 appears, with the counts adding to 5. Placing 5 identical counters into 9 boxes is choosing positions for 5 counters among 5+8=13 symbols (counters and the 8 dividers between boxes): (135)=1287.

What the interviewer listens for: Reducing the order question to a choice question is the insight; say it before computing. If you do not know the counters-and-dividers argument, try a smaller case (two-digit numbers) and look for the pattern.

Follow-up question: How many five-digit numbers have digits that strictly increase and add up to 25?

8. Twice as far

Points A=(0,0) and B=(4,0) are fixed. Describe the set of points P in the plane with PA=2PB. Does it meet the y-axis?

Hint 1

Write P=(x,y) and square both sides of PA=2PB.

Hint 2

Complete the square in x.

Full solution

Answer: The circle with centre (163,0) and radius 83; it does not meet the y-axis.

Squaring, x2+y2=4((x−4)2+y2), so 3x2+3y2−32x+64=0, that is x2+y2−323x+643=0. Completing the square:

(x−163)2+y2=(83)2.

So P lies on the circle with centre (163,0) and radius 83. It crosses the x-axis at x=83 and x=8: check PA=83=2⋅43 and PA=8=2⋅4.

It does not meet the y-axis: the circle lies in 83≤x≤8. Geometrically, a point on the y-axis is never further from A than from B, so it cannot be twice as far.

What the interviewer listens for: Squaring is safe here because both sides are non-negative; saying so earns credit. The geometric reason for the last part is a nice touch after the algebra.

Follow-up question: What is the set of points with PA=λPB for other λ>0? What happens at λ=1?

9. Differences of two squares

Can 2026 be written as a2−b2 with a,b integers? What about 2027 and 2028? Which positive integers can be written this way?

Hint 1

a2−b2=(a−b)(a+b). What can you say about the parity of a−b and a+b?

Hint 2

Look at remainders on division by 4. Is 2027 prime?

Full solution

Answer: 2026: no. 2027=10142−10132. 2028: three ways. Exactly the integers not ≡2(mod4).

a2−b2=(a−b)(a+b), and a−b and a+b differ by 2b, so they are both odd or both even. If both are odd the product is odd; if both are even it is a multiple of 4. So a number that leaves remainder 2 on division by 4 is never a difference of two squares. 2026=4⋅506+2: impossible.

Every odd number works: 2m+1=(m+1)2−m2. So 2027=10142−10132. Since 2027 is prime (it has no prime factor up to 43, and 452>2027), this is the only way with a>b≥0.

Every multiple of 4 works: 4m=(m+1)2−(m−1)2. For 2028, write a−b=2d, a+b=2e with de=507=3⋅132 and d<e: (d,e)=(1,507),(3,169),(13,39), giving 5082−5062, 1722−1662 and 522−262.

So a positive integer is a difference of two squares exactly when it does not leave remainder 2 on division by 4.

What the interviewer listens for: Factorising a^2 - b^2 and thinking about parity is the expected first move. A full answer has both directions: why remainder 2 fails, and a construction for everything else.

Follow-up question: In how many ways can 210 be written as a2−b2 with a>b≥0?

Stretch problems

10. Which is bigger?

Without a calculator, decide which is larger: 230 or 319.

Hint 1

Rewrite both with exponent 9 or 10: 230=810 and 319=3⋅99.

Hint 2

Compare (98)9 with 83. The binomial expansion gives a lower bound for (1+18)9.

Full solution

Answer: 319 is larger.

230=810=8⋅89 and 319=3⋅99. So

319230=38(98)9.

By the binomial theorem, keeping only the first three (positive) terms,

(1+18)9≥1+98+3664=4316.

So 319230≥38⋅4316=129128>1. Hence 319 is larger, though only by a few per cent.

What the interviewer listens for: Logarithms you happen to remember are not a proof unless you can justify the precision. A clean exact comparison like this, and saying how close the two numbers are, is what impresses.

Follow-up question: Which is larger, 2100 or 363? How confident can you be without a calculator?

11. How many solutions?

For each real number k, how many real solutions does the equation x2e−x=k have?

Hint 1

Sketch y=x2e−x: find where it is increasing and decreasing.

Hint 2

What does the graph do as x→∞ and as x→−∞? Then slide a horizontal line y=k up the page.

Full solution

Answer: 0 for k<0; 1 for k=0; 3 for 0<k<4e−2; 2 for k=4e−2; 1 for k>4e−2.

Let f(x)=x2e−x. Then f(x)≥0, with f(0)=0, and f′(x)=x(2−x)e−x. So f decreases on (−∞,0], increases on [0,2] and decreases on [2,∞): a minimum f(0)=0 and a maximum f(2)=4e−2.

As x→−∞, f(x)→∞; as x→∞, f(x)→0 from above.

Counting where y=k meets the graph:

  • k<0: no solutions;
  • k=0: one solution (x=0);
  • 0<k<4e−2: three solutions (one negative, one in (0,2), one greater than 2);
  • k=4e−2: two solutions (x=2 and one negative);
  • k>4e−2: one solution (negative).

What the interviewer listens for: This is really a curve-sketching question. The interviewer listens for the limits at both ends and for the careful treatment of the boundary cases k = 0 and k = 4/e^2.

Follow-up question: For which k does x3e−x=k have exactly two solutions?

12. A function that undoes itself

Let f(x)=x+1x−1 for x≠1. Work out f(f(x)). What does this tell you about the graph of y=f(x)? For which constants a does g(x)=x+ax−1 have the same property?

Hint 1

Simplify carefully: put f(x) into f and multiply top and bottom by x−1.

Hint 2

If f(f(x))=x, then f is its own inverse. How are the graphs of a function and its inverse related?

Full solution

Answer: f(f(x))=x: the graph is symmetric in y=x. g is its own inverse for every a≠−1.

f(f(x))=x+1x−1+1x+1x−1−1=(x+1)+(x−1)(x+1)−(x−1)=2x2=x for x≠1.

So f is its own inverse, and its graph is symmetric in the line y=x (reflecting it in y=x gives the graph of the inverse, which is f again). It meets y=x where x2−2x−1=0, at x=1±2.

For g, put g(x) into g and multiply top and bottom by x−1: the top becomes (x+a)+a(x−1)=(1+a)x and the bottom becomes (x+a)−(x−1)=a+1. So g(g(x))=x whenever a≠−1. When a=−1, g(x)=1 for every x≠1, a constant, which is not its own inverse.

What the interviewer listens for: Careful algebra out loud, then the geometric meaning. The special case a = -1 is exactly the kind of detail interviewers probe.

Follow-up question: For which p,q,r,s is h(x)=px+qrx+s its own inverse?

How we wrote and checked these

Every problem here is our own, written for this site. None is copied or adapted from a university's sample questions, an admissions test or another website's list, and well-known interview questions were deliberately avoided. Every answer was re-derived and checked independently, and a sample was re-solved by hand without looking at the solutions.

Next steps

A Level Math Revision is independent: it is not affiliated with or endorsed by UCAS or any university. Facts about UCAS and universities are summarised in our own words with links: always check the official page. We give guidance only and never write statements for students.