Skip to content
Top 100 Most Asked QuestionsLaunching soon20% off the yearly Test Series pass
Klay
Start Learning

LearnQuantitative AptitudeNumber System

02.07 · Number System

Factorials & Trailing Zeros

Elite lesson11 formulas10 questions

On the syllabus of

Elite lesson34 minEnglish

Formulas

At a glance 11 formulas

  1. 1Factorialn!=1×2×3×⋯×nn! = 1 \times 2 \times 3 \times \cdots \times n0!=1,(n+1)!=(n+1)×n!0! = 1,\quad (n+1)! = (n+1) \times n!
  2. 2Values to know
    4!4!
    24
    5!5!
    120
    6!6!
    720
    7!7!
    5,040
    8!8!
    40,320
    9!9!
    3,62,880
    10!10!
    36,28,800
  3. 3Factor out the smallestTake the smallest factorial out as a common factor: 7!+8!+9!=7!(1+8+72)=81×7!7! + 8! + 9! = 7!(1 + 8 + 72) = 81 \times 7!.
  4. 4Prime power in n!⌊np⌋+⌊np2⌋+⌊np3⌋+⋯\left\lfloor \tfrac{n}{p} \right\rfloor + \left\lfloor \tfrac{n}{p^{2}} \right\rfloor + \left\lfloor \tfrac{n}{p^{3}} \right\rfloor + \cdots
  5. 5Divide and addDivide nn by pp, then the quotient by pp, and so on, and add the quotients. For 2 in 50!50!: 25+12+6+3+1=4725 + 12 + 6 + 3 + 1 = 47.
  6. 6Trailing zerosZ(n!)=⌊n5⌋+⌊n25⌋+⌊n125⌋+⋯Z(n!) = \left\lfloor \tfrac{n}{5} \right\rfloor + \left\lfloor \tfrac{n}{25} \right\rfloor + \left\lfloor \tfrac{n}{125} \right\rfloor + \cdots2s always outnumber 5s in n!\text{2s always outnumber 5s in } n!
  7. 7Power of a compositeSplit it into primes, count each prime in n!n!, divide by its exponent and take the smallest: for 18=2×3218 = 2 \times 3^{2}, use min⁡(e2,⌊e3/2⌋)\min(e_2, \lfloor e_3/2 \rfloor).
  8. 8Zeros in any productCount the 2s and the 5s in the whole product; the number of zeros at the end is the smaller count.
  9. 9Zero counts that skipEach multiple of 25 adds two or more zeros at once, so some counts never occur: no n!n! ends in exactly 5 or 11 zeros. Any count above 0 that occurs fits exactly 5 values of nn.
  10. 10Remainders of factorial sumsOnce n!n! is a multiple of the divisor, so is every later term: by 15, 1!+2!+⋯+40!1! + 2! + \cdots + 40! leaves what 1+2+6+24=331 + 2 + 6 + 24 = 33 leaves, 3.
  11. 11Wilson's theorem(p−1)!≡−1(modp)(p-1)! \equiv -1 \pmod p(p−2)!≡1(modp)(p-2)! \equiv 1 \pmod p

Test yourself

10 questions · 3 easy · 4 medium · 3 hard

Tap an option to answer. The first tap counts.

  1. Q1Easy

    What is the value of 12!10!\dfrac{12!}{10!}?

    Correct answer132

    Why

    Cancel the common part: 12!=12×11×10!12! = 12 \times 11 \times 10!.

    The 10!10! cancels, leaving 12×1112 \times 11.

    So the value is 132.

  2. Q2Easy

    For a campus fundraiser, the organising team labels souvenir boxes from 11 to 9090 and later calculates 90!90! while coding an inventory shortcut. How many trailing zeros will 90!90! have?

    Correct answer21

    Why

    Zeros come from 5s, since 2s are always in surplus.

    From 1 to 90 there are 18 numbers divisible by 5, each giving one 5, and 25, 50 and 75 give a second one: 3 more.

    18+3=2118 + 3 = 21, so 90!90! ends in 21 zeros.

8 more questions: 1 easy, 4 medium, 3 hard

Sign in free to see all ten and get your score. No payment, no card.

More practice: IPMAT, IIMB, FEAT, MUSAT, AAA, MSAT, NPAT, SET and Christ BBA previous year questions

Logos and exam names belong to their owners. Klay Prep is not affiliated with them.