Find last three non zero digits of: 1^1 * 2^2 * 3^3 * ... * 25^25
\(1^1 * 2^2 * 3^3 * \dots * 25^{25}\)
I think that I should write this sequence into a form of factorials, like this: \(25! * \frac{25!}{1!} * \frac{25!}{2!} * \frac{25!}{3!} * \dots * \frac{25!}{24!}\) However, I can't figure out how to find the last non zero digits.
It looks to me that the sequence could be simplified to: \(\frac{26!}{(24!)!}\), but somehow it's not logical, since the answer would be less than 1. The weird thing is that from the sequence with factorials, algebraically it makes sense. Unless I missed something. But anyway, it doesn't help much...
I think we should collect the factors 2 and 5 to know about the number of 0s in the end
Well, 25! has 6 zeros. 24!, 23!, 22!, 21!, 20! - 4 and so on. However, how does it help?
I misread the problem; but I understand what @ganeshie8 means now. We are NOT calculating this: \[\prod_{n=1}^{25} n^n \mod 1000\] since that's 0.
Yes, I understand that. But I doubt that there would be much use of the information about the zeros, since we don't know the number (and it's too huge to really calculate) and it has quite a lot of zeros, so taking modulus 10^30 wouldn't be too efficient.
I don't really understand your response. I think ganeshie is suggesting you remove an equal number of factors of 2 and 5 from the number since their only affect is to push more 0s onto the end of the number. For instance: 987600 = 100 * 9876 and the question is basically telling us, given 9876000 what are the last 3 nonzero digits, so removing them will give us 9876 so we can have some sorta better shot at looking at the last three digits since we don't even know where those last 3 nonzero digits even begin until we remove these 2s and 5s.
So, taking 5^5 and 25^25 we get that there are 5^55. Taking powers of 2: 2^2, 4^4, 16^16 we get 2^70. So, we are left with 2^15...
And we get rid of all 5's. But ehh... I wonder what to do next.
That should have been 2^74 instead of 2^70. And 2^19 are left.
I'm almost certain there's an easier way to do this, I basically just went and wrote down the factors of 2 and 5 separate from the others. There are quite a lot because you have to remember like \(12^{12} = 4^{12} 3^{12}\) will contribute some 2s #_#
But we can nulify only 100 powers of 2, since all the factors of 5 give only 100 fives. Doesn't simplify everything all that much.
Well if you don't think it's worth it, then don't do it lol. In a way, it seems like whatever tricks we would have to reinvent to solve this are outdated because the answer is here: http://www.wolframalpha.com/input/?i=prod_n%3D1%5E25+n%5En&t=crmtb01
Oh my! Thank you ;) Although there must be a way to solve the problem without a need of calculator.
As @ganeshie8 said, remove all numbers which can cause a zero and then you can apply mod 100. That should work :)
Well.. not exactly "remove", but "take care of"
@Bobo-i-bo You mean mod 1000. But the thing is that applying it right away would give quite a lot of work and it would be basically brute forcing the answer out.
Divide the given number by 10^100 Then consider mod 8 and mod 125 separately
mod8 is trivially 0 Let's see if mod 125 reduces nicely
So, with 125 we should brute force it?
Doesn't look pleasant Have you posted this on mse yet ?
Just posted it there. http://math.stackexchange.com/questions/1839495/find-last-three-non-zero-digits-of-11-22-33-2525
From Mathematica: Product[n^n,{n,1,25}] = 497185762203664855552185998816896654110500405113276749599978598106931376893494727725282888973492960103709733727153193463708885418512905774093764912953208857603592287998625419889230083409597924481802029018856086302867663765278744104280011739417404311473395694078325532626381686366787338240000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
Join our real-time social learning platform and learn together with your friends!