Modulus Application Problem I think

  • Context: Undergrad 
  • Thread starter Thread starter Thundagere
  • Start date Start date
  • Tags Tags
    Application Modulus
Click For Summary

Discussion Overview

The discussion revolves around determining the last two nonzero digits of a factorial, specifically in the context of math competitions. Participants explore various methods, particularly focusing on modulus techniques and the implications of trailing zeros in factorials.

Discussion Character

  • Exploratory
  • Technical explanation
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • Some participants suggest using modulus techniques, specifically calculating x! (MOD 100) to find the last two digits.
  • Concerns are raised about the presence of trailing zeros in large factorials, particularly for numbers like 100!, which complicate finding nonzero digits.
  • One participant mentions a formula for counting the number of trailing zeros in a factorial, indicating that for 100!, there are 24 trailing zeros.
  • Another participant proposes a method involving prime factorization to determine the last nonzero digits, detailing the steps taken to remove factors of 5 and 2 that contribute to zeros.
  • There is acknowledgment that while modular arithmetic is interesting, the approach to finding nonzero digits can become tedious.

Areas of Agreement / Disagreement

Participants express differing views on the best approach to find the last two nonzero digits of a factorial. Some agree on the utility of modular arithmetic, while others highlight the challenges posed by trailing zeros, indicating that the discussion remains unresolved.

Contextual Notes

Limitations include the complexity of the calculations involved in removing factors contributing to trailing zeros and the potential for tediousness in the proposed methods. There is also a lack of consensus on a definitive approach to the problem.

Who May Find This Useful

This discussion may be useful for students and enthusiasts interested in combinatorial mathematics, number theory, and competitive math problem-solving techniques.

Thundagere
Messages
159
Reaction score
0
Hey all,
I've been wondering about a few questions that seem to turn up a lot in math competitions—namely, what are the last 2 nonzero digits of some number x!. I've seen it a lot, and I'm wondering how one would go about solving that?
I believe that one can use some modulus techniques to solve the problem, but I'm not well versed in those at all, so if someone could explain it to me, it would be greatly appreciated. Thank you!
 
Mathematics news on Phys.org
Thundagere said:
Hey all,
I've been wondering about a few questions that seem to turn up a lot in math competitions—namely, what are the last 2 nonzero digits of some number x!. I've seen it a lot, and I'm wondering how one would go about solving that?
I believe that one can use some modulus techniques to solve the problem, but I'm not well versed in those at all, so if someone could explain it to me, it would be greatly appreciated. Thank you!

Hey Thundagere.

The easiest may to think about this is to think about the modulus of a number.

For this particular problem you want to find x! (MOD 100) since this will give you the remainder after you divide x! by 100 which is basically the last two digits.

There is a whole area dedicated to things like this that relate to number theory in the way of congruence arithmetic and diophantine equations if you are interested in exploring more.
 
But what about when it comes to something like 100!? Since every 5 and 2 make 10, every number 5 and above is going to add a 0. In that event, there are so many 0s that this wouldn't work to find the nonzero last digits. Is there another solution for that?
Modular arithmetic definitely looks interesting. :)
 
Thundagere said:
But what about when it comes to something like 100!? Since every 5 and 2 make 10, every number 5 and above is going to add a 0. In that event, there are so many 0s that this wouldn't work to find the nonzero last digits. Is there another solution for that?
Modular arithmetic definitely looks interesting. :)

Once you get past a certain number, you don't have to worry about calculating anything since it doesn't change the first two decimal places.

As an example calculate 5! vs 6! and 10! vs 11! and take note of what happens in terms of what values actually change.
 
for the number of ending zeros in a factorial, its n/5 +n/25 +n/125 etc.
for 100!, this would be 20 +4 = 24.
 
ah... your question was about non-zero values, i apologize.
unfortunately, i see no good way to approach this problem other than doing the factorial, dividing by the number of zeros, and taking mod 100.
 
Hmmm...I think with these formulas, I can probably reason it out. At any rate, modular arithmetic is looking to be quite an interesting area to study next. Thanks!
 
Just an update for anyone with similar question:
I found a way to do it, however, it tends to get a tad tedious. Basically, using a method mentioned earlier, I listed out all the prime factors up to that number (using 15 as an example)
15!
2, 3, 5, 7, 11, 13

Then I use the method mentioned, of 15/2 + 15/4 ... for all the numbers. This enables me to find the prime factorization.

2^11 * 3^6 * 5^3 * 11 * 13

I know that it's the 5 and 2 that makes the 0s. So I remove the three 5s and 3 of the 2s.

2^8 * 3^6 * 11 * 13

Now, it's a fairly simple matter to find the last few digits. One knows that 4 power eight will follow the 2, 4, 6, 8 ending digit pattern, so using simliar logic, the ending digits (the last few, anyhow) will be

8 * 9 * 1 * 3
Which ends up being
216.
Thus the last few digits are 216. I'm fairly certain I got it right. Thanks to everyone who helped me in this!
 

Similar threads

  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 14 ·
Replies
14
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 6 ·
Replies
6
Views
1K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 14 ·
Replies
14
Views
3K
Replies
2
Views
3K
  • · Replies 13 ·
Replies
13
Views
3K
  • · Replies 32 ·
2
Replies
32
Views
4K
  • · Replies 2 ·
Replies
2
Views
2K