22 original competition-style problems: divisibility, primes, remainders and digits. Try each one before opening the hints; the second hint gives more away, and the full solution explains why the method works and where the idea leads.
15 free with full solutions. Problems marked ‘With a plan’ show the question to everyone; their hints, answer checking and full solutions are included with every A Level, IB, IGCSE and CBSE plan. See plans.
For teachers: project, add to a worksheet or set as homework
Press Project on any problem to show it full screen with a timer, the hints, the answer and the worked solution one step at a time (arrow keys move between problems; Space reveals the next step; F full screen; Esc closes). Switch on the ‘Add to worksheet’ buttons, pick problems, then print them from the worksheet builder or set them as homework for a class, with the full solutions as the mark scheme. Free problems are free for every class; problems marked ‘With a plan’ can be set by teachers with a plan or school licence. Ready-made sessions: maths club packs.
For how many bases b with 2 ≤ b ≤ 2026 is the number 2026, written in base b, a palindrome (reads the same forwards and backwards)?
Hint
Split by the number of digits. Two digits: 2026 = a(b + 1). Three digits: 13 ≤ b ≤ 45.
Second hint
Two-digit palindromes are multiples of b + 1, so b + 1 divides 2026 = 2 × 1013. For three digits, test b from 13 to 45.
Full worked solution
Answer: 5
Split by the number of digits of 2026 in base b.
Two digits happen for 46 ≤ b ≤ 2026 (b2 > 2026). A two-digit palindrome is ‘aa’ = a(b + 1) with 1 ≤ a < b.
So b + 1 divides 2026 = 2 × 1013: b + 1 = 1013 (a = 2, b = 1012) or b + 1 = 2026 (a = 1, b = 2025). (b + 1 = 2 is too small.)
Three digits happen when b2 ≤ 2026 < b3, i.e. 13 ≤ b ≤ 45. A palindrome ‘a c a’ means 2026 = a(b2 + 1) + cb.
Checking these bases: b = 13 gives digits 11, 12, 11 (11 × 170 + 12 × 13 = 2026); b = 14 gives 10, 4, 10 (10 × 197 + 56); b = 45 gives 1, 0, 1 (2025 + 1). No other base in 13–45 works.
For b ≤ 12 the number has four or more digits, and none of those representations is a palindrome.
Total: bases 13, 14, 45, 1012, 2025: 5.
Why this works: Base-b digits come from repeated division, and fixing the number of digits turns ‘palindrome’ into a small equation in b. Two-digit palindromes are always multiples of b + 1.
Where it leads: Every number n ≥ 3 is the palindrome 11 in base n − 1, so the interesting question is which numbers are palindromes in no smaller base (these are called strictly non-palindromic numbers)
1013 is prime. What is the smallest positive integer n such that n! is divisible by 20262?
Hint
20262 = 22 × 10132. How big must n be for n! to contain 1013 twice?
Second hint
1013 is prime, so n! contains 1013 exactly ⌊n/1013⌋ times (for n < 10132).
Full worked solution
Answer: D, 2026
20262 = 22 × 10132, so n! needs at least two factors of the prime 1013 (the 2s are easy).
The prime 1013 appears in n! once for each multiple of 1013 that is at most n (10132 is far bigger than any n here).
Two factors need two multiples of 1013: 1013 and 2026. So n ≥ 2026.
2026! contains 1013 and 2026 = 2 × 1013, and plenty of 2s, so it is divisible by 20262.
The smallest n is 2026 (D). (1013! up to 2025! contain 1013 only once.)
Why this works: Legendre’s idea: the power of a prime p in n! counts multiples of p, p2, … up to n. For a large prime only the multiples of p itself matter.
Where it leads: The largest prime factor usually decides how big n must be for n! to be divisible by a given number.
Why this works: Fermat’s little theorem gives a cycle length that divides p − 1, so the exponent only matters modulo 1012.
Where it leads: Fermat’s theorem is the basis of fast primality tests; numbers that pass them without being prime are pseudoprimes, like 341 = 11 × 31 for base 2.
How many whole numbers x with 0 ≤ x ≤ 104 satisfy x2 ≡ 1 (mod 105)?
Hint
105 = 3 × 5 × 7. Solve x2 ≡ 1 modulo each prime separately.
Second hint
Modulo a prime p, x2 ≡ 1 has exactly two solutions, x ≡ ±1.
Full worked solution
Answer: 8
x2 ≡ 1 (mod 105) exactly when it holds mod 3, mod 5 and mod 7.
Mod a prime p, x2 − 1 = (x − 1)(x + 1) ≡ 0 forces x ≡ 1 or −1: 2 choices each.
By the Chinese remainder theorem each combination of choices gives exactly one x mod 105: 2 × 2 × 2 = 8.
Why this works: Splitting a modulus into coprime prime factors turns one hard congruence into several easy ones, and the Chinese remainder theorem glues the answers back.
Where it leads: So 1 has 8 square roots mod 105. Factoring a number N is equivalent to finding a non-trivial square root of 1 mod N, which is why RSA’s security rests on factoring.
If p ≠ 3, p is not a multiple of 3, so p2 ≡ 1 (mod 3) and p2 + 2 ≡ 0 (mod 3).
Then p2 + 2 is a multiple of 3 greater than 3, so not prime. (p = 2 gives 6.)
p = 3 gives 11, which is prime. Answer: only p = 3 (C).
Why this works: Squares of non-multiples of 3 always leave remainder 1, so adding 2 lands on a multiple of 3.
Where it leads: The same trick shows that among p, p + 2, p + 4 at least one is a multiple of 3, so (3, 5, 7) is the only ‘prime triple’ of that shape.
For how many whole numbers n with 1 ≤ n ≤ 100 is n! divisible by n2?
Hint
n2 divides n! exactly when n divides (n − 1)!.
Second hint
If n is prime, n does not divide (n − 1)!. If n is composite, it usually does: check n = 4.
Full worked solution
Answer: 74
n! / n2 = (n − 1)!/n, so we need n | (n − 1)!.
If n = p is prime, no factor of (p − 1)! is a multiple of p, so it fails. There are 25 primes up to 100.
If n = ab with 1 < a < b < n, both a and b appear in (n − 1)!, so it works. If n = p2 with p > 2, then p and 2p are both below n, so it works. n = 4 fails (3! = 6). n = 1 works (1 divides 0! = 1).
So the count is 100 − 25 − 1 = 74 (all except the 25 primes and 4).
Why this works: Reducing to n | (n − 1)! and handling primes, products of distinct factors and squares of primes separately covers every case.
Where it leads: Wilson’s theorem sharpens this: (n − 1)! ≡ −1 (mod n) exactly when n is prime. It is a beautiful (but slow) primality test.