How to find the first 2 nonzero terms in Mod100 of n! without a prefix?

  • Thread starter heartyface
  • Start date
In summary, the conversation discusses how to find the first two nonzero terms in n! and if there is a shortcut. It also explains a method for finding the last two non-zero digits before all the zeros at the end of n! and the challenges involved in multiplying large numbers. The conversation also touches on number theory and its applications in cryptography.
  • #1
heartyface
28
0
hello
so I know how to get the 0s in n!, but how do I find the first 2 nonzero terms?
Is there a shortcut?
thanks :)
 
Mathematics news on Phys.org
  • #2
do you mean the 2 right-most non-zero digits?

if so, that is not mod 100, unless you only have 2 "trailing 0's".

it WILL be mod 10k for some k, but n! grows very quickly, and so unless n is between 10 and 14 (inclusive), k is not 2.
 
  • #3
hehe... that's why I said '2' first *nonzero* terms to n!
 
  • #4
heartyface said:
hehe... that's why I said '2' first *nonzero* terms to n!

i understood what i thought you meant. but, realize the convention in english, is to parse left-to-right, so the first 2 digits of 5687 are 5 and 6, not 7 and 8.

i don't think there is a general formula for all n, usually, finding the right-most non-zero digits of n! requires a fair amount of work (finding the number of 0's at the end is not so bad, you can count occurences of factors of 5 (since we get 5 even numbers for every 2 multiples of 5, the factors of 5 will be the limiting factor, here)).

do you have a specific n! in mind?
 
  • #5
<random number generator> hmm, let's go with 109!
and yeah my english sux :P also, that's interesting! hmm, so if I actually did mean the 'first' 2 digits of n!, that seems... way more work(?!) hehe, let me try that out
 
  • #6
To find the last 2 non-zero digits before all the zeros at the end.

factor n!, which is easy, because it has [n/p] + [n/p^2] + [n/p^3] + ... factors of p.

(where [x] is the largest integer, smaller or equal to x)

remove all factors of 5, and an equal number of factors of 2, now multiply what is left together modulo 100, so you never have to multiply numbers with more than 2 digits.
 
  • #7
willem2 said:
To find the last 2 non-zero digits before all the zeros at the end.

factor n!, which is easy, because it has [n/p] + [n/p^2] + [n/p^3] + ... factors of p.

(where [x] is the largest integer, smaller or equal to x)

remove all factors of 5, and an equal number of factors of 2,
.

yuh... i knew that:)
willem2 said:
now multiply what is left together modulo 100, so you never have to multiply numbers with more than 2 digits
it's easy to say that.. but how do you 'multiply the numbers' when there are some 100s of them.. then simply modulo100 it :(
 
  • #8
heartyface said:
yuh... i knew that:)
it's easy to say that.. but how do you 'multiply the numbers' when there are some 100s of them.. then simply modulo100 it :(

There are quite a lot of results in number theory that help you do these kinds of problems and also problems that are useful for doing this for really really large numbers (this kind of thing is common in cryptographic applications).
 
  • #9
ummm so like from this problem http://www.artofproblemsolving.com/Wiki/index.php/2010_AMC_10A_Problems/Problem_24
I don't understand it from the M=(1*2*3*4)(6*7*8*9)...*(86*87*88*89)......blabla
yup :( enlightenments?
 
Last edited by a moderator:
  • #10
oaKka.png
 

FAQ: How to find the first 2 nonzero terms in Mod100 of n! without a prefix?

What is Mod100 of n?

Mod100 of n, also known as the modulus of n with respect to 100, is the remainder when the number n is divided by 100.

How is Mod100 of n calculated?

Mod100 of n is calculated by finding the remainder after dividing n by 100 using the modulus operator (%).

What is the significance of Mod100 of n?

Mod100 of n is often used in programming and mathematics to determine if a number is divisible by 100 or to extract the last two digits of a number.

Is Mod100 of n only applicable to integers?

Yes, Mod100 of n is only applicable to integers. It is not defined for non-integer numbers.

Can Mod100 of n be negative?

Yes, Mod100 of n can be negative. If n is a negative number, the result of Mod100 of n will also be negative.

Similar threads

Replies
10
Views
565
Replies
20
Views
3K
Replies
7
Views
2K
Replies
9
Views
1K
Replies
3
Views
1K
Back
Top