LATEST

Technique 25 of 37

Unit digits, remainders and factorial zeros

इकाई अंक, शेषफल और फैक्टोरियल के शून्य

Find the unit digit of huge powers, the remainder of products and powers, the zeros at the end of n!, and the number and sum of divisors, all from tiny calculations.

When to use it · कब उपयोग करें

Questions of the form "what is the unit digit of ...", "what is the remainder when ... is divided by ...", "how many zeros at the end of 100!", and "how many divisors does this number have".

"... का इकाई अंक क्या है", "... को ... से भाग देने पर शेषफल क्या है", "100! के अंत में कितने शून्य हैं", और "इस संख्या के कितने भाजक हैं" जैसे प्रश्न।

The method · विधि

  1. Only the unit digits matter for sums, products and differences · योग, गुणन और घटाव में केवल इकाई अंक मायने रखते हैं

    The units digit of a sum or a product depends only on the units digits of the numbers. For 47 × 38, take 7 × 8 = 56, so the answer ends in 6; indeed 47 × 38 = 1786. For 123 + 457 + 998, take 3 + 7 + 8 = 18, so the answer ends in 8; indeed the sum is 1578. For a difference, subtract the digits and borrow 10 if needed, provided the first number is the bigger one: if the units digits are 2 and 9, treat it as 12 − 9 = 3.

    योग या गुणनफल का इकाई अंक केवल संख्याओं के इकाई अंकों पर निर्भर करता है। 47 × 38 में 7 × 8 = 56 लें, इसलिए उत्तर 6 पर समाप्त होगा; वास्तव में 47 × 38 = 1786। 123 + 457 + 998 में 3 + 7 + 8 = 18 लें, इसलिए उत्तर 8 पर समाप्त होगा; वास्तव में योग 1578 है। घटाव में अंकों को घटाएँ और ज़रूरत हो तो 10 उधार लें, बशर्ते पहली संख्या बड़ी हो: इकाई अंक 2 और 9 हों तो इसे 12 − 9 = 3 मानें।

  2. Cyclicity: powers repeat in cycles of 4 (or less) · चक्रीयता: घातें 4 (या कम) के चक्र में दोहराती हैं

    The unit digit of the powers of any number repeats. Digits 0, 1, 5, 6 never change. Digits 4 and 9 repeat in 2 steps: 4, 6 and 9, 1. Digits 2, 3, 7, 8 repeat in 4 steps: 2, 4, 8, 6; 3, 9, 7, 1; 7, 9, 3, 1; 8, 4, 2, 6. Every cycle length (1, 2 or 4) divides 4, so use the exponent divided by 4 for every digit. Find the remainder of the exponent on division by 4: remainder 1, 2 or 3 means take the 1st, 2nd or 3rd entry of the cycle; remainder 0 means take the 4th (last) entry. For 7^45: 45 = 4 × 11 + 1, so the unit digit is the first entry of 7, 9, 3, 1, which is 7.

    किसी भी संख्या की घातों का इकाई अंक दोहराता है। अंक 0, 1, 5, 6 कभी नहीं बदलते। अंक 4 और 9 दो चरणों में दोहराते हैं: 4, 6 और 9, 1। अंक 2, 3, 7, 8 चार चरणों में दोहराते हैं: 2, 4, 8, 6; 3, 9, 7, 1; 7, 9, 3, 1; 8, 4, 2, 6। हर चक्र की लंबाई (1, 2 या 4) 4 को विभाजित करती है, इसलिए हर अंक के लिए घातांक को 4 से भाग दें। घातांक का 4 से शेषफल देखें: शेषफल 1, 2 या 3 हो तो चक्र की पहली, दूसरी या तीसरी प्रविष्टि लें; शेषफल 0 हो तो चौथी (अंतिम) प्रविष्टि लें। 7^45 में 45 = 4 × 11 + 1, इसलिए इकाई अंक 7, 9, 3, 1 की पहली प्रविष्टि यानी 7 है।

  3. Remainders of sums and products: reduce first · योग और गुणनफल के शेषफल: पहले घटाएँ

    The remainder of a product is the remainder of the product of the remainders; the same is true for sums and differences. To find the remainder of 17 × 19 × 23 on division by 7, reduce each factor: 17 leaves 3, 19 leaves 5, 23 leaves 2. Then 3 × 5 × 2 = 30, and 30 = 7 × 4 + 2, so the remainder is 2. A remainder can be written as a negative number to keep things small: 19 is 1 less than 20, so every power of 19 leaves remainder ±1 on division by 20, with the sign alternating.

    गुणनफल का शेषफल शेषफलों के गुणनफल का शेषफल होता है; योग और अंतर पर भी यही लागू है। 17 × 19 × 23 को 7 से भाग देने पर शेषफल के लिए हर गुणक घटाएँ: 17 का शेष 3, 19 का 5, 23 का 2। फिर 3 × 5 × 2 = 30 और 30 = 7 × 4 + 2, इसलिए शेषफल 2 है। चीज़ें छोटी रखने के लिए शेषफल ऋणात्मक भी लिख सकते हैं: 19, 20 से 1 कम है, इसलिए 19 की हर घात को 20 से भाग देने पर शेषफल ±1 आता है, चिह्न बारी-बारी से बदलता रहता है।

  4. Remainders of powers: find the cycle or a power equal to 1 · घातों के शेषफल: चक्र या ऐसी घात खोजें जो 1 के बराबर हो

    Find the smallest power of the base that leaves remainder 1, then use the exponent modulo that length. For 2^50 on division by 7: 2³ = 8 leaves 1, and 50 = 3 × 16 + 2, so 2^50 behaves like 2², which is 4. For 3^100 on division by 5: 3⁴ = 81 leaves 1, and 100 = 4 × 25, so the remainder is 1. For a prime p and a base not divisible by p, the Fermat-style rule says a^(p − 1) leaves remainder 1, so the cycle length divides p − 1. Another shortcut: a^n + b^n is divisible by a + b when n is odd. So 11^15 + 13^15 leaves 0 on division by 24, because 11 + 13 = 24.

    आधार की सबसे छोटी वह घात खोजें जिसका शेषफल 1 हो, फिर घातांक को उस लंबाई से भाग देकर शेष लें। 2^50 को 7 से भाग देने पर: 2³ = 8 का शेष 1 है और 50 = 3 × 16 + 2, इसलिए 2^50 का व्यवहार 2² जैसा है, यानी 4। 3^100 को 5 से भाग देने पर: 3⁴ = 81 का शेष 1 है और 100 = 4 × 25, इसलिए शेषफल 1 है। अभाज्य p और ऐसे आधार के लिए जो p से विभाज्य न हो, फ़र्मा-शैली का नियम कहता है कि a^(p − 1) का शेष 1 है, इसलिए चक्र की लंबाई p − 1 को विभाजित करती है। एक और शॉर्टकट: n विषम हो तो a^n + b^n, a + b से विभाज्य होता है। इसलिए 11^15 + 13^15 को 24 से भाग देने पर शेष 0 आता है, क्योंकि 11 + 13 = 24।

  5. Zeros at the end of n! · n! के अंत के शून्य

    Each zero needs a factor 10 = 2 × 5, and factors of 2 are always plentiful, so count the factors of 5. Add n ÷ 5, n ÷ 25, n ÷ 125 and so on, taking only the whole-number part each time. For 100!: 100 ÷ 5 gives 20, 100 ÷ 25 gives 4, and 100 ÷ 125 gives 0 as a whole number. The total is 20 + 4 = 24 zeros. For 250!: 250 ÷ 5 gives 50, 250 ÷ 25 gives 10, 250 ÷ 125 gives 2, and 50 + 10 + 2 = 62.

    हर शून्य के लिए गुणनखंड 10 = 2 × 5 चाहिए, और 2 के गुणनखंड सदा प्रचुर होते हैं, इसलिए 5 के गुणनखंड गिनें। n ÷ 5, n ÷ 25, n ÷ 125 आदि जोड़ें, हर बार केवल पूर्ण भाग लेकर। 100! में: 100 ÷ 5 से 20, 100 ÷ 25 से 4, और 100 ÷ 125 से पूर्ण भाग 0 मिलता है। कुल 20 + 4 = 24 शून्य। 250! में: 250 ÷ 5 से 50, 250 ÷ 25 से 10, 250 ÷ 125 से 2, और 50 + 10 + 2 = 62।

  6. Divisor count and sum from the prime factorisation · अभाज्य गुणनखंडन से भाजकों की संख्या और योग

    Write the number as p^a × q^b × r^c. The number of divisors is (a + 1)(b + 1)(c + 1), because each divisor chooses an exponent from 0 up to the full power for every prime. The sum of divisors is the product of the sums 1 + p + ... + p^a for each prime. Take 360 = 2³ × 3² × 5. Count: 4 × 3 × 2 = 24. Sum: (1 + 2 + 4 + 8) × (1 + 3 + 9) × (1 + 5) = 15 × 13 × 6, and 15 × 13 = 195, and 195 × 6 = 1170. Odd divisors use only the odd primes: 360 has (2 + 1)(1 + 1) = 6 odd divisors.

    संख्या को p^a × q^b × r^c के रूप में लिखें। भाजकों की संख्या (a + 1)(b + 1)(c + 1) है, क्योंकि हर भाजक प्रत्येक अभाज्य के लिए 0 से पूरी घात तक का एक घातांक चुनता है। भाजकों का योग हर अभाज्य के योगों 1 + p + ... + p^a का गुणनफल है। 360 = 2³ × 3² × 5 लें। गिनती: 4 × 3 × 2 = 24। योग: (1 + 2 + 4 + 8) × (1 + 3 + 9) × (1 + 5) = 15 × 13 × 6, और 15 × 13 = 195, तथा 195 × 6 = 1170। विषम भाजकों में केवल विषम अभाज्य आते हैं: 360 के (2 + 1)(1 + 1) = 6 विषम भाजक हैं।

Where it shows up in exams · परीक्षा में कहाँ आता है

Typically appears in SSC CGL and CHSL number-system questions as "unit digit of a large expression", "remainder when a product or power is divided by a small number", "number of zeros in n!", and "number of divisors" problems; also useful as a quick check on a long multiplication.

सामान्यतः SSC CGL और CHSL के संख्या-पद्धति प्रश्नों में "बड़े व्यंजक का इकाई अंक", "गुणनफल या घात को छोटी संख्या से भाग देने पर शेषफल", "n! में शून्यों की संख्या" और "भाजकों की संख्या" के रूप में आता है; लंबे गुणा की त्वरित जाँच में भी काम आता है।

Worked examples · हल किए उदाहरण

19 examples, graded from warm-up to hard. Cover the steps and solve each one before reading it.

Warm-up (7)
Unit digit of 47 × 38 = 6
  • Only the units digits matter: 7 × 8 = 56
  • Unit digit 6
  • Check: 47 × 38 = 1786
Unit digit of 123 + 457 + 998 = 8
  • 3 + 7 + 8 = 18
  • Unit digit 8
  • Check: 123 + 457 + 998 = 1578
Unit digit of 7^45 = 7
  • Cycle for 7: 7, 9, 3, 1 (length 4)
  • 45 = 4 × 11 + 1, so remainder 1
  • Take the 1st entry: 7
Unit digit of 3^102 = 9
  • Cycle for 3: 3, 9, 7, 1
  • 102 = 4 × 25 + 2, so remainder 2
  • Take the 2nd entry: 9
Unit digit of 2^100 = 6
  • Cycle for 2: 2, 4, 8, 6
  • 100 = 4 × 25, so remainder 0: take the 4th entry
  • The unit digit is 6 (check: 2⁴ = 16)
Unit digit of 24^75 = 4
  • Cycle for 4: 4, 6 (length 2)
  • Odd power gives the first entry
  • Unit digit 4
Unit digit of 17^23 × 13^17 = 9
  • 17^23 has the unit digit of 7^23: 23 = 4 × 5 + 3, third entry of 7, 9, 3, 1 is 3
  • 13^17 has the unit digit of 3^17: 17 = 4 × 4 + 1, first entry is 3
  • Product of unit digits: 3 × 3 = 9
Exam level (6)
Unit digit of 2^35 + 3^35 = 5
  • 2^35: 35 = 4 × 8 + 3, third entry of 2, 4, 8, 6 is 8
  • 3^35: third entry of 3, 9, 7, 1 is 7
  • Sum of unit digits: 8 + 7 = 15
  • Unit digit 5
Unit digit of 12^13 − 7^14 = 3
  • 12^13: 2^13 with 13 = 4 × 3 + 1, so unit digit 2
  • 7^14: 14 = 4 × 3 + 2, second entry of 7, 9, 3, 1 is 9
  • The first number is larger, so borrow: 12 − 9 = 3
  • Unit digit 3
Remainder when 17 × 19 × 23 is divided by 7 = 2
  • 17 leaves 3, 19 leaves 5, 23 leaves 2
  • 3 × 5 × 2 = 30
  • 30 = 7 × 4 + 2
  • Remainder 2 (check: 17 × 19 × 23 = 7429 and 7 × 1061 = 7427)
Remainder when 2^50 is divided by 7 = 4
  • 2³ = 8, which leaves remainder 1 on division by 7
  • 50 = 3 × 16 + 2
  • So 2^50 behaves like 2², which is 4
Remainder when 3^100 is divided by 5 = 1
  • 3⁴ = 81, which leaves remainder 1 on division by 5
  • 100 = 4 × 25
  • So 3^100 leaves remainder 1
Remainder when 15^20 is divided by 16 = 1
  • 15 is 1 less than 16, so 15 leaves remainder −1
  • An even power of −1 is +1
  • Check: 15² = 225 and 16 × 14 = 224, so 15² leaves 1
  • Remainder 1
Hard (6)
Remainder when 11^15 + 13^15 is divided by 24 = 0
  • The exponent 15 is odd, so a + b divides a^15 + b^15
  • 11 + 13 = 24
  • So the whole expression is a multiple of 24
Number of zeros at the end of 100! = 24
  • Count factors of 5: 100 ÷ 5 gives 20
  • 100 ÷ 25 gives 4
  • 100 ÷ 125 gives 0 (whole part)
  • 20 + 4 = 24
Number of zeros at the end of 250! = 62
  • 250 ÷ 5 gives 50
  • 250 ÷ 25 gives 10
  • 250 ÷ 125 gives 2
  • 50 + 10 + 2 = 62
Number of divisors of 360 = 24
  • 360 = 2³ × 3² × 5
  • Add 1 to each exponent: 4, 3, 2
  • 4 × 3 × 2 = 24
Sum of the divisors of 360 = 1170
  • For 2³: 1 + 2 + 4 + 8 = 15
  • For 3²: 1 + 3 + 9 = 13
  • For 5: 1 + 5 = 6
  • 15 × 13 = 195
  • 195 × 6 = 1170
Last two digits of 7^102 = 49
  • 7² = 49 and 7⁴ = 2401, which ends in 01
  • So every fourth power of 7 ends in 01
  • 102 = 4 × 25 + 2, so 7^102 ends in the same two digits as 7²
  • The last two digits are 49

Why it works · यह क्यों काम करता है

Writing every integer as 10m + u, the product (10m1 + u1)(10m2 + u2) = 100m1m2 + 10(m1u2 + m2u1) + u1u2, so only u1u2 affects the unit digit. The cycle exists because there are only 10 possible unit digits, so powers must eventually repeat, and it divides 4 for the digits 2, 3, 7, 8 because the multiplication table forces it. For remainders, if a = qd + r then a^n = r^n plus a multiple of d, so you may replace a by r. The zeros formula comes from Legendre: the exponent of a prime p in n! is the sum of n ÷ p, n ÷ p², and so on, with whole parts only, because each multiple of p² contributes a second factor that the first count missed. The divisor count follows because each divisor picks an exponent from 0 to a for p, from 0 to b for q, and these choices multiply.

हर पूर्णांक को 10m + u लिखें तो गुणनफल (10m1 + u1)(10m2 + u2) = 100m1m2 + 10(m1u2 + m2u1) + u1u2 होता है, इसलिए इकाई अंक केवल u1u2 से प्रभावित है। चक्र इसलिए बनता है कि इकाई अंक के केवल 10 संभव मान हैं, इसलिए घातें अंततः दोहराएँगी, और अंक 2, 3, 7, 8 के लिए यह लंबाई 4 को विभाजित करती है क्योंकि गुणन सारणी यही बाध्य करती है। शेषफल में, यदि a = qd + r हो तो a^n = r^n + d का गुणज, इसलिए a की जगह r रख सकते हैं। शून्यों का सूत्र लेजेंद्र का है: n! में अभाज्य p की घात n ÷ p, n ÷ p² आदि के पूर्ण भागों का योग है, क्योंकि p² के हर गुणज में एक दूसरा गुणनखंड है जो पहली गिनती में छूट गया था। भाजकों की गिनती इसलिए सही है कि हर भाजक p के लिए 0 से a और q के लिए 0 से b तक घातांक चुनता है, और ये चुनाव गुणा होते हैं।

Common trap · आम ग़लती

When the exponent is a multiple of 4, students write remainder 0 and take the zeroth power (unit digit 1). The correct move is to take the last entry of the cycle: 2^100 ends in 6, not 1. Another trap is applying the sum-of-powers rule (a + b divides a^n + b^n) to even n; it works only for odd n.

जब घातांक 4 का गुणज हो तो विद्यार्थी शेष 0 लिखकर शून्य घात (इकाई अंक 1) ले लेते हैं। सही तरीका चक्र की अंतिम प्रविष्टि लेना है: 2^100 का इकाई अंक 6 है, 1 नहीं। एक और जाल है घातों के योग वाला नियम (a + b से a^n + b^n विभाज्य) सम n पर लगाना; यह केवल विषम n के लिए चलता है।

When it stops helping · कब काम नहीं आता

These methods answer questions about the last digit or the remainder only; they tell you nothing about the size of the number. For remainders on division by a composite number with large prime parts, the cycle can be long, so reduce by the prime factors one at a time or use a different route. Fermat-style shortcuts apply only when the base and the divisor are coprime.

ये विधियाँ केवल अंतिम अंक या शेषफल के प्रश्नों का उत्तर देती हैं; संख्या के आकार के बारे में कुछ नहीं बतातीं। बड़े अभाज्य भागों वाली संयुक्त संख्या से भाग देने पर चक्र लंबा हो सकता है, इसलिए अभाज्य गुणनखंडों से बारी-बारी घटाएँ या कोई और रास्ता लें। फ़र्मा-शैली के शॉर्टकट तभी चलते हैं जब आधार और भाजक सह-अभाज्य हों।

Practise this technique Practice questions are part of the Pro Pass; a few samples are free.

Related techniques

Open the cheat sheets for squares, cubes, fractions and divisibility rules.