Find the largest prime number p such that when 2012! is written in base p, it has at least p trailing zeroes.
The answer is 43 because 43^2 is the biggest squared prime number that is less than 2012!
I did work this our logically but BUT I will admit that it may be difficult for me to show this logic.
I will try
Say the number was not 2012! Say it is what ever number factorial that will work if
p is 2
1*2*3*4 = 1*2*3*2*2 = 3*2*2*2 this will have 3 trailing zeros when written in base 2 (there is no version with only 2 trailing zeros)
so if p=2 then it would have to be factorial 4. Note that 2^2=4
Try p=3
I need the smallest factorial (X!) where X! written in base 3 has at least 3 trainling zeros. So I need at least 3^3 = 27 to be a factor
1*2*3*4*5*6*7*8*9 = 1*2*3*4*5*2*3*7*8*3*3 = 3^4 * 2*4*5*2*7*8 = 9!
when 9! is written in base 3 there will be 4 trailing zeros .. It is imposible to have only 3
Try p=5
I need the smallest factorial (X!) where X! written in base 5 has at least 5 trainling zeros. So I need at least 5^5 to be a factor
1*2*3*4*5*6*7*8*9*10* ..... 25
= (Some integer without 5 as a factor)* 5*1* 5*2 * 5*3 * 5*4 * 5*5
= (Some integer without 5 as a factor)* 5 * 5 * 5* 5 * 5*5
= (Some integer without 5 as a factor)* 5^6
when 25! is written in base 5 there will be 6 trailing zeros .. It is imposible to have only 5
Let me try and explan the general version.
Let the number be p
Consider this
\((p^2)!=1*2*......1p.......*2p........*(p-1)p.....*(pp) \\ (p^2)!=1*2*...1*2* ...*(p-1).....*p^{(p-1)}.....*p^2\\ (p^2)!=(\text{An interger without p as a factor}).....*p^{(p-1)}.....*p^2\\ (p^2)!=(\text{An interger without p as a factor}).....*p^{(p+1)}\\\)
Back to the original question
Find the largest prime number p such that when 2012! is written in base p, it has at least p trailing zeroes.
\(\sqrt{2012}\approx 44.8\)
The closest prime number less than 44.8 is 43
So p=43
-------------------------------------------------------------------------
Lets check
\(2012! = \text{(Some integer that does not have 43 as a factor)}*43*2*43*3*43 *..........42*43*43*43\\ 2012! = \text{(Some integer that does not have 43 as a factor)}*43^{42}*43*43\\ 2012! =\text{(Some integer that does not have 43 as a factor)}*43^{44}\\ \text{When written in Base 43 2012! will have 44 trailing zeros.}\)
What about if p=47, maybe it will work too?
\( 2012! = \text{(Some integer that does not have 47 as a factor)}*47*2*47*3*47 *..........42*47\\ 2012! = \text{(Some integer that does not have 43 as a factor)}*47^{42}\\ \text{When written in Base 47 2012! will only have 42 trailing zeros.}\\ \text {so Base 47 will definitely not work} \)
.