💬 DISCUSSION Cambridge math interview
Is this question considered easy, average, or difficult for a math interview? I honestly have no idea 😭
Would the actual interview questions be much harder than this? I know it varies depending on the interviewee, but I'm wondering what the average difficulty level is.
326
Upvotes
36
u/The_Guy210 2d ago
Its a moderate or maybe quite a challenging question. But when considered its an interview question. I’d range it between easy-moderate
153
u/Samaya234 2d ago
I literally just finished doing maths at Cambridge and it took me a second to clock how to do this. I don’t know why everyone is saying ‘it’s so easy’ lmao - you’re fine, don’t panic. Interview questions tend to always accumulate to a peak in difficulty and you won’t be expected to just spam modular arithmetic without any inspiration to do so
30
u/PerfectTeam4474 Warwick | Maths [Year 1] 2d ago
If you find a question easy they'll just throw in a harder one until you struggle and need their hints. It's not really about being able to solve the questions easily and quickly which is the mistake I found out too late tbh.
47
u/Few-Example3992 2d ago edited 2d ago •
I seem to have done it differently to everyone else so feel like I should share my approach.
For n>=10, n! ends in 00, so n!+5 ends in a 05. If it is equal to a cube the cube will be divisible by 125 and hence end in 00, 25 50, 75. This is impossible so we only need to check the cases for n<10.
5
u/_-Star_ 2d ago
I would say it's easy
Look at the reminder when dividing by 7
11
u/ProfessorOne6500 2d ago edited 2d ago
One way i thought of solving it was recalling that every cube number is either 1 less than , exactly , or 1 more than a multiple of 9. So this means after n=6 (1×2×(3)×4×5×(6)) then they would all be the form 9n+5 and thus have no chance of being a perfect cube , simple exhaustion after that
5
u/Odd-Oven-8202 2d ago
Jaymin Shah video huh
3
u/espressoristretto 2d ago
This is an olympiad question, not an interview question. I would argue it's too hard for a warm-up question as well, so something like this is unlikely to come up.
3
u/Remarkable_Fee4136 1d ago
It is fairly well known that cubes are -1,0 or 1 mod 9. n!+5 is 5 mod 9 for all n>5, so listing, n=5 is the only solution.
The problem is very trivial if you know this fact, and for a math interview I'd expect a decent number of candidates would. It becomes more tedious if you don't, so this problem is really not more than a test of your general knowledge.
2
u/TobySuren 2d ago
its worth mentioning the interviewer would be giving you questions and hints slowly as you're going through, this in itself isn't really an interview question
2
u/bwelch32747 2d ago
You can prove that you can have gaps between primes of arbitrary size using a similar technique. If you have p prime dividing n!+5, if p is bigger than 5 then p divides p! But not 5 so it cannot divide their sum. So you know already to look for numbers below 5 or 5.
1
u/Hairy-Ostrich-6908 2d ago
no such thing as an east inteview question tbh they jst keep on pushing you till they reach smth u dont know and then they see how quickly you learn
1
u/stqrltt Year 13 2d ago
they're not expecting you to know the answer. don't try to
1
u/Many-Durian-6530 2d ago
for n>10, v5(n) kills it, so just casework from there
1
u/thepfy1 2d ago
A large component of Cambridge interviews is seeing how you think and how far your can extrapolate from what you have learned with a bit of information.
If you get a place, they expect you to be asking lots of questions in supervisions. Most people get told off at the end of the first term for not asking enough.
1
u/Mabrrrrrr 2d ago edited 1d ago
I think this uses the cubic residue mod 7. So, it is well known that n3 三-1,0,1 modulo 7, But I'll write them all out. 13 三1 mod 7.
23 三8三1 mod 7.
33 三27三-1 mod 7.
43 三64三1 mod 7.
53 三125三-1 mod 7.
63 三216三-1 mod 7.
73 三0 mod 7.
First of all, notice that if n>=7, we get that n!三0 mod 7(because when n>=7 they are all divisible by 7). So, n!+5三5 mod 7, which is not a cubic residue. Therefore, you check the values n<=6 and find that only n=5 works.
This is actually not too hard for an olympiad question, but I don't think a lot of people know anything about modular arithmetic or even cubic residues.
(Mod 9 could also work just take n>5, it will not be a cubic residue)
1
u/leefsh 2d ago
I think the only challenge here is noticing that 5 is a prime number and that 5 | (n! + 5) for n >= 5. So we have for n>=5, ((n! + 1) is a perfect cube) implies (5^3 | (n! + 5)). By factoring by 5 we have 5(n!/5 + 1), and we notice that 5 doesn't divide (n!/5 + 1) for n >= 10. Thus 5^3 doesn't divide n! + 5 , and you just need to test out integers from 0 to 9.
1
u/rockybrockylocky 2d ago
Usually when looking at cubes mod 7 is nice, cuz they’re either 0,1,-1 mod 7. For n>=7, it’s 5 mod 7 so can’t be a cube. Test out values from 1 to 6, and you find only n=5 works.
1
u/Adventurous_Suit_241 1d ago
Find a prime p s.t. 5 is not a cube mod p. That's it... then you would see that n!+5 not a perfect cub for all n\geq p. And you're reduced to checking only finitely many cases: n=0,1,...,p-1.
1
u/ClearLocation7289 1d ago
I'd say this is meant to be an easy question question if you have experience and a moderate one if you don't. Every times you see a question of the kind "when is f(n) in the form p(m)", where f and m are integer functions, you are expected to immediately at least try to tackle the problem with modular arithmetic, which in this case works very well
As a general advice, studying n-th powers is usually easier mod 2n+1 if 2n+1 is a prime. For example, the first thing I did when I saw the word cube was checking what are the possibilities for cubes mod 7. This might take mildy advanced mathematics (at least, in form I know it) to justify, so just take it as a fact.
1
u/Character-Avocado-66 1d ago
these comments make me realize there are levels to ts as a ppe applicant
1
u/cerikstas 1d ago
When do ppl do this interview? To get in? I'm a bit old, but don't recall any entrance interview to Cambridge
1
u/No-Site8330 1d ago
So first thoughts here. If n≥5 then n! is divisivle by 5, and thus so is n!+5. This means that the perfect cube in question must also be divisible by 53, and in particular by 25. That being the case, 25 cannot divide n!, which means that n≤9. Now one can just manually try out all values of n between 0 and 9.
Now I can't say the following is entirely my idea because I read another comment saying a very similar thing, but I think if I were asked to continue from here I would probably start looking at congruences modulo something. Up to n=4 the check is trivial. For n=5 it is rather straightforward. For n=6 we get f(6) = 720+5 = 725. If this were a cube, it would be divisible by 53 = 125, which it isn't since 625 = 54 = 125×5 and 0 < 725-625 = 100 < 125 (or you can do 725/5 = 145 which is not divisible by 25). For 7 and up the numbers start becoming annoying enough that I would try for an easier way out. Now if n≥7 then n! vanishes modulo 7, so the statement that n!+5 is a perfect cube implies that 5 is a cube modulo 7. But then you write down all cubes modulo 7 and you find that only 1, 0, and -1 are cubes, so n≥7 leads to a contradiction.
1
u/Moblin88 1d ago
As others have pointed out, this is a classic “contest” style problem. If you have done any math contest prep, you will probably find it easy since you will have seen how do problems like this. When you are asked about powers and factorials, the answer will almost always been some trick about modular arithmetic, since large factorials are always divisible by small numbers, and powers on small finite rings are usually only a small number of possible values. Also, the fact that you are asked to list all values suggests that there a small number of small finite cases, and then there’s some reason why there are no large solutions. These two facts suggest the way to attack the problem. Even if you can’t recall any specific facts about cube divisibility, you can probably just check small moduli until you find one that works the way you need. I think this is mostly there to see if you are a “math contest” type of person, which is presumably the kind of person enthusiastic about math they are looking for. The problem itself and its solution are not particularly elegant or interesting.
1
u/Savings-Ad-1115 1d ago
Other comments are talking about the well-known modulo-7 rule.
I didn't know this rule, so here is how I solved it.
Let's start with a brute force for small numbers, to see where it is going.
1!+5 = 6 is not a cube
2!+5 = 7 is not a cube
3!+5 = 11 is not a cube
4!+5 = 29 is not a cube
5!+5 = 125 is a cube of 5.
Are there other solutions?
Wait a minute... starting from n≥5, n! is a multiple of 5.
So, n!+5 is also a multiple of 5.
So, it any other cubes exist, they will be also multiples of 5.
So, I need to look for cubes of (5k).
If k is even, k=2m, then a cube of (5*2m) is a cube of (10m), so the cube is a multiple of 1000.
For n≥2, n! is even, then n!+5 is odd.
But 1000 is even, so n!+5 can't be a multiple of 1000.
Therefore, k can't be even.
If k is odd, k=2m+1, then cube of (5*(2m+1)) is a cube of (10m+5).
I know a cube of (10m+5) ends with either 25 or 75, but I need to prove it.
(10m+5)³ = (1000m³+1500m²+750m+25).
(1000m³+1500m²+750m+25) mod 100 = (750m+25) mod 100 = (50m+25) mod 100.
For even m=2p, (50m+25) mod 100 = (100p+25) mod 100 = 25.
For odd m=2p+1, (50m+25) mod 100 = (100p+50+25) mod 100 = 75.
Therefore, (10m+5)³ mod 100 is either 25 or 75.
For n≥10, (n! mod 100) = 0, so ((n!+5) mod 100) = 5.
5 is neither 25 nor 75, so there are no solutions for n≥10.
So, all I need is to continue my brute force for values from 6 to 9.
6!+5 = 720+5=725.
It ends with 25, so I need to check if it is a cube.
725/5 = 145, 145/5=29.
29 is not a multiple of 5, so, 725 is not a cube.
7!+5 = 5040+5 = 5045.
It doesn't end with 25 or 75, so it is not a cube.
8!+5 = 40320+5 = 40325.
It ends with 25, so I need to check if it is a cube.
40325/5 = 8065, 8065/5=1613.
1613 is not a multiple of 5, so 40325 is not a cube.
9!+5 = 362880+5 = 362885.
It doesn't end with 25 or 75, so it is not a cube.
That's all.
The only solution is n=5: 5!+5 = 125 = 5³.
0
u/Savings-Apple8932 2d ago
Hi, I am also preparing for the interview. Could you recommend some resources that I can use to practice? I could not find a good question bank
-3
u/Direct_Bullfrog4294 Y11 | A* (Math) A*A*A*A* Pred (FM/Phy/Chem/Econ) 2d ago
I think its really easy if ur used to olympiads like BMOs.
Think about taking mod3. As k^2=1 or 0 mod3 (this can be easily shown, 1^2=1, 2^2=4=1, 3^2=9=0), n!+5=n!+2=1 or 0 mod3.
So, n!=1 or 2 mod3.
As we know n!=0 for n>=3 (because it has a 3 in its factor) and 0 is not a solution, we know n=1 or 2.
As n=1 gives 6 which aint a square and 2 gives 7 which also aint, we know there are no positive integer n satisfying the case.
0
u/[deleted] 23h ago
[deleted] — view deleted comment