Welcome! Check out our free B-School Guides to learn how you compare with other applicants.
Login or Register

Last two non zero digits of a factorial.

This topic has 2 expert replies and 5 member replies
nisagl750 Really wants to Beat The GMAT!
Joined
31 Jan 2012
Posted:
145 messages
Followed by:
2 members
Thanked:
16 times
Last two non zero digits of a factorial. Post Fri Feb 01, 2013 9:02 am
Elapsed Time: 00:00
  • Lap #[LAPCOUNT] ([LAPTIME])
    We know the power cycle works fine to find out the last digit of any factorial (It will be zero for any factorial greater than 5) and any number raised to the power of another number.
    For Eg: Last non zero digit of 123456^123456 = 6 (following the power cycle of 6 which always gives a 6)

    I also know that last two non zero digits of a multiplication can be found out by multiplying last two digits of the numbers multiplied.
    i.e. last two non zero units digit of 2345*162 = 45*62 = 2790, So last two non zero digits will be 79.


    I wanted to know, Is there any formula to find out last two or last three non zero digits of a multiplication?
    for eg: last two non zero digits of 237^169?

    Is there any general formula or method that we can use to calculate last N non zero digits of a^b or a*b (where a & b can be any positive integers? )

    Need free GMAT or MBA advice from an expert? Register for Beat The GMAT now and post your question in these forums!

    GMAT/MBA Expert

    Jim@StratusPrep MBA Admissions Consultant
    Joined
    11 Nov 2011
    Posted:
    2028 messages
    Followed by:
    239 members
    Thanked:
    600 times
    GMAT Score:
    770
    Post Tue Feb 05, 2013 2:36 pm
    Not that I know of, but, more importantly, this is not something you will need for the gmat

    _________________
    If you find my posts helpful. Please take the time to click the "thank" icon at the top of the page and/or follow me!

    For in-person tutoring and help visit Stratus Prep:

    GMAT Tutoring | MBA Admission Consulting | GMAT Diagnostic Exam


    For my personally written study guides and online courses visit GMAT Prepster:
    GMAT Quant Diagnostic | Online GMAT Courses | GMAT Prep

    nisagl750 Really wants to Beat The GMAT!
    Joined
    31 Jan 2012
    Posted:
    145 messages
    Followed by:
    2 members
    Thanked:
    16 times
    Post Wed Feb 06, 2013 1:54 am
    Thanks Jim,

    Do last non zero digit problems come in GMAT?

    The Iceman Really wants to Beat The GMAT! Default Avatar
    Joined
    15 Oct 2012
    Posted:
    191 messages
    Followed by:
    6 members
    Thanked:
    47 times
    Post Wed Feb 06, 2013 11:21 pm
    This problem type is beyond the scope of GMAT, unless the problem involves a factorial of a single digit number (basically a very easy to calculate number). So, please do not invest time on such problems.

    However, solely for knowledge purposes I will give you a quick formula to calculate the last non-zero integer of a factorial.

    Lets say f(x) denotes the last non zero digit of factorial, then

    Case 1: If tens digit of x is odd

    f(x)= Last digit of (4*f[x/5]*f(Unit digit of x)); here [x/5] is the greatest integer function

    Case 2:If tens digit of x is even

    f(x)= Last digit of (6*f[x/5]*f(Unit digit of x)); here [x/5] is the greatest integer function

    e.g. Last non zero digit of 37! can be calculated as follows:

    f(37)= Last digit of (4*f[37/5]*f(7))= Last digit of (4*f(7)*f(7))= Last digit of (4*4*4) = 4

    nisagl750 Really wants to Beat The GMAT!
    Joined
    31 Jan 2012
    Posted:
    145 messages
    Followed by:
    2 members
    Thanked:
    16 times
    Post Thu Feb 07, 2013 12:16 am
    The Iceman wrote:
    This problem type is beyond the scope of GMAT, unless the problem involves a factorial of a single digit number (basically a very easy to calculate number). So, please do not invest time on such problems.

    However, solely for knowledge purposes I will give you a quick formula to calculate the last non-zero integer of a factorial.

    Lets say f(x) denotes the last non zero digit of factorial, then

    Case 1: If tens digit of x is odd

    f(x)= Last digit of (4*f[x/5]*f(Unit digit of x)); here [x/5] is the greatest integer function

    Case 2:If tens digit of x is even

    f(x)= Last digit of (6*f[x/5]*f(Unit digit of x)); here [x/5] is the greatest integer function

    e.g. Last non zero digit of 37! can be calculated as follows:

    f(37)= Last digit of (4*f[37/5]*f(7))= Last digit of (4*f(7)*f(7))= Last digit of (4*4*4) = 4
    Thanks Vineet,

    To find out f(7), we have to calculate it or we can apply the above formula again.
    Can you please explain giving one 3 digit number example?

    -
    nisagl
    -----------------------------
    If I make mistakes please correct me.

    The Iceman Really wants to Beat The GMAT! Default Avatar
    Joined
    15 Oct 2012
    Posted:
    191 messages
    Followed by:
    6 members
    Thanked:
    47 times
    Post Thu Feb 07, 2013 2:38 am
    nisagl750 wrote:
    Thanks Vineet,

    To find out f(7), we have to calculate it or we can apply the above formula again.
    Can you please explain giving one 3 digit number example?

    -
    nisagl
    -----------------------------
    If I make mistakes please correct me.
    Basically f(1) to f(10) are easy to find. f(3)=6=> f(4)=4=> f(5)=2=> f(6)=2=> f(7)=4=> f(8)=2=> f(9)=8=> f(10)=8

    The above formula works only for two digit numbers. Let me give you a formula that works for any integer.

    Consider a recursive function f(x) = Last Digit of {(2^m).f(m).f(n)}, where f(x) denotes the last non zero digit of factorial and x=5m+n

    f(37)= Last Digit of {(2^7).f(7).f(2)} = last digit of (8*4*2) = 4


    f(137)= Last Digit of {(2^27).f(27).f(2)} = last digit of {2^28 * f(27)} = last digit of{2^28 * last digit of(2^5).f(5).f(2)} = last digit of{2^28 * last digit of 2^7}=last digit of{2^35} = 8

    GMAT/MBA Expert

    Jim@StratusPrep MBA Admissions Consultant
    Joined
    11 Nov 2011
    Posted:
    2028 messages
    Followed by:
    239 members
    Thanked:
    600 times
    GMAT Score:
    770
    Post Thu Feb 07, 2013 4:27 am
    Point of all this --> don't waste your time with this for the GMAT.

    _________________
    If you find my posts helpful. Please take the time to click the "thank" icon at the top of the page and/or follow me!

    For in-person tutoring and help visit Stratus Prep:

    GMAT Tutoring | MBA Admission Consulting | GMAT Diagnostic Exam


    For my personally written study guides and online courses visit GMAT Prepster:
    GMAT Quant Diagnostic | Online GMAT Courses | GMAT Prep

    nisagl750 Really wants to Beat The GMAT!
    Joined
    31 Jan 2012
    Posted:
    145 messages
    Followed by:
    2 members
    Thanked:
    16 times
    Post Thu Feb 07, 2013 10:03 am
    Thanks Vineet and Jim.

    I understood how to calculate. But as Jim said, I will not waste more of my time on this topic for GMAT.

    Best Conversation Starters

    1 melanie.espeland 27 topics
    2 aditya8062 18 topics
    3 Rastis 14 topics
    4 chacha0212 13 topics
    5 yadu9991 12 topics
    See More Top Beat The GMAT Members...

    Most Active Experts

    1 image description GMATGuruNY

    The Princeton Review Teacher

    111 posts
    2 image description Brent@GMATPrepNow

    GMAT Prep Now Teacher

    83 posts
    3 image description CriticalSquareMBA

    Critical Square

    55 posts
    4 image description MBAPrepAdvantage

    MBAPrepAdvantage

    24 posts
    5 image description Jon@Admissionado

    Admissionado

    20 posts
    See More Top Beat The GMAT Experts