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

  • Context: High School 
  • Thread starter Thread starter heartyface
  • Start date Start date
Click For Summary

Discussion Overview

The discussion revolves around finding the first two nonzero terms of n! modulo 100, exploring methods and challenges associated with this problem. Participants consider both the right-most nonzero digits and the implications of trailing zeros in factorials.

Discussion Character

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

Main Points Raised

  • Some participants seek clarification on whether the focus is on the last two nonzero digits or the first two digits of n!.
  • There is a suggestion that finding the right-most nonzero digits of n! requires significant effort, particularly due to the presence of trailing zeros.
  • One participant proposes a method involving factoring n!, removing factors of 5 and an equal number of factors of 2, and then multiplying the remaining factors modulo 100.
  • Another participant expresses uncertainty about how to multiply a large number of factors while keeping track of the modulo operation.
  • Participants mention the relevance of number theory results that could assist in solving such problems, particularly in the context of large numbers and cryptographic applications.
  • A participant references a specific problem from a math competition, indicating a need for further understanding of the approach taken in that problem.

Areas of Agreement / Disagreement

There is no consensus on the best approach to find the first two nonzero terms of n! modulo 100, and multiple competing views and methods are presented throughout the discussion.

Contextual Notes

Participants express uncertainty about the definitions and conventions used in the problem, particularly regarding the interpretation of "first" and "last" nonzero digits. The discussion also highlights the complexity of the calculations involved in finding these terms.

heartyface
Messages
28
Reaction score
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
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.
 
hehe... that's why I said '2' first *nonzero* terms to n!
 
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?
 
<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
 
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.
 
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 :(
 
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).
 
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
 

Similar threads

  • · Replies 77 ·
3
Replies
77
Views
8K
  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 20 ·
Replies
20
Views
4K
  • · Replies 14 ·
Replies
14
Views
3K
  • · Replies 23 ·
Replies
23
Views
4K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 13 ·
Replies
13
Views
3K
  • · Replies 18 ·
Replies
18
Views
3K