Modulus Application Problem I think

In summary, the conversation discusses the method of finding the last 2 nonzero digits of a factorial number. It involves using modulus techniques and prime factorization to remove the zeros and find the remaining digits. This method can be used for numbers up to a certain limit, after which it becomes tedious. The conversation also mentions the use of modular arithmetic and how it can be an interesting area to study.
  • #1
Thundagere
159
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
  • #2
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.
 
  • #3
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. :)
 
  • #4
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.
 
  • #5
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.
 
  • #6
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.
 
  • #7
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!
 
  • #8
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!
 

1. What is a modulus application problem?

A modulus application problem is a mathematical problem that involves finding the remainder after dividing one number by another. This is often denoted by the % symbol and can be solved using the modulus operator in programming languages or by hand using long division.

2. How do I solve a modulus application problem?

To solve a modulus application problem, you can use the modulus operator in programming or use long division by hand. First, divide the larger number by the smaller number and determine the remainder. This remainder is the solution to the modulus application problem.

3. What are some real-life examples of modulus application problems?

Modulus application problems can be found in many real-life situations, such as calculating change after a purchase, determining the number of days in a week, or finding the hour on a clock using 24-hour time. It can also be used in cryptography and coding to generate unique keys and check for errors.

4. How is modulus different from division?

Modulus and division are both mathematical operations, but they differ in the result they produce. Division gives the quotient or the answer to a division problem, while modulus gives the remainder. Additionally, division can have a fractional or decimal result, while modulus always gives a whole number.

5. Are there any other uses for modulus besides solving application problems?

Yes, modulus has many other uses in mathematics and computer science. It can be used to determine if a number is even or odd, to find the greatest common divisor of two numbers, and to generate cyclic patterns in sequences. In programming, modulus is often used to check for divisibility, create unique IDs, and create loops in code.

Similar threads

Replies
14
Views
1K
Replies
8
Views
355
  • General Math
Replies
13
Views
1K
Replies
6
Views
1K
  • Programming and Computer Science
Replies
6
Views
1K
  • Art, Music, History, and Linguistics
Replies
13
Views
456
  • STEM Academic Advising
Replies
5
Views
1K
  • STEM Academic Advising
Replies
7
Views
964
  • STEM Academic Advising
Replies
6
Views
851
  • Introductory Physics Homework Help
Replies
3
Views
2K
Back
Top