• Varsity Tutors
    Award-winning private GMAT tutoring
    Register now and save up to $200

    Available with Beat the GMAT members only code

    MORE DETAILS
    Varsity Tutors
  • Economist Test Prep
    Free Trial & Practice Exam
    BEAT THE GMAT EXCLUSIVE

    Available with Beat the GMAT members only code

    MORE DETAILS
    Economist Test Prep
  • EMPOWERgmat Slider
    1 Hour Free
    BEAT THE GMAT EXCLUSIVE

    Available with Beat the GMAT members only code

    MORE DETAILS
    EMPOWERgmat Slider
  • Target Test Prep
    5-Day Free Trial
    5-day free, full-access trial TTP Quant

    Available with Beat the GMAT members only code

    MORE DETAILS
    Target Test Prep
  • Kaplan Test Prep
    Free Practice Test & Review
    How would you score if you took the GMAT

    Available with Beat the GMAT members only code

    MORE DETAILS
    Kaplan Test Prep
  • PrepScholar GMAT
    5 Day FREE Trial
    Study Smarter, Not Harder

    Available with Beat the GMAT members only code

    MORE DETAILS
    PrepScholar GMAT
  • Veritas Prep
    Free Veritas GMAT Class
    Experience Lesson 1 Live Free

    Available with Beat the GMAT members only code

    MORE DETAILS
    Veritas Prep
  • Magoosh
    Magoosh
    Study with Magoosh GMAT prep

    Available with Beat the GMAT members only code

    MORE DETAILS
    Magoosh
  • e-gmat Exclusive Offer
    Get 300+ Practice Questions
    25 Video lessons and 6 Webinars for FREE

    Available with Beat the GMAT members only code

    MORE DETAILS
    e-gmat Exclusive Offer

Last two non zero digits of a factorial.

This topic has 2 expert replies and 5 member replies
nisagl750 Master | Next Rank: 500 Posts
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:
    2278 messages
    Followed by:
    265 members
    Thanked:
    659 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

    _________________
    GMAT Answers provides a world class adaptive learning platform.
    -- Push button course navigation to simplify planning
    -- Daily assignments to fit your exam timeline
    -- Organized review that is tailored based on your abiility
    -- 1,000s of unique GMAT questions
    -- 100s of handwritten 'digital flip books' for OG questions
    -- 100% Free Trial and less than $20 per month after.
    -- Free GMAT Quantitative Review

    nisagl750 Master | Next Rank: 500 Posts
    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 Master | Next Rank: 500 Posts Default Avatar
    Joined
    15 Oct 2012
    Posted:
    194 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 Master | Next Rank: 500 Posts
    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 Master | Next Rank: 500 Posts Default Avatar
    Joined
    15 Oct 2012
    Posted:
    194 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:
    2278 messages
    Followed by:
    265 members
    Thanked:
    659 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.

    _________________
    GMAT Answers provides a world class adaptive learning platform.
    -- Push button course navigation to simplify planning
    -- Daily assignments to fit your exam timeline
    -- Organized review that is tailored based on your abiility
    -- 1,000s of unique GMAT questions
    -- 100s of handwritten 'digital flip books' for OG questions
    -- 100% Free Trial and less than $20 per month after.
    -- Free GMAT Quantitative Review

    nisagl750 Master | Next Rank: 500 Posts
    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 LUANDATO 153 topics
    2 lheiannie07 87 topics
    3 Roland2rule 75 topics
    4 AAPL 62 topics
    5 ardz24 60 topics
    See More Top Beat The GMAT Members...

    Most Active Experts

    1 image description EconomistGMATTutor

    The Economist GMAT Tutor

    166 posts
    2 image description GMATGuruNY

    The Princeton Review Teacher

    130 posts
    3 image description Jay@ManhattanReview

    Manhattan Review

    128 posts
    4 image description Rich.C@EMPOWERgma...

    EMPOWERgmat

    121 posts
    5 image description Brent@GMATPrepNow

    GMAT Prep Now Teacher

    99 posts
    See More Top Beat The GMAT Experts