Skip to content
geeksforgeeks
  • Tutorials
    • Python
    • Java
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
    • Practice Coding Problems
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Number System and Arithmetic
  • Algebra
  • Set Theory
  • Probability
  • Statistics
  • Geometry
  • Calculus
  • Logarithms
  • Mensuration
  • Matrices
  • Trigonometry
  • Mathematics
Open In App
Next Article:
Remainder When Dividing by 6
Next article icon

Remainder When Dividing by 6

Last Updated : 07 Nov, 2024
Comments
Improve
Suggest changes
Like Article
Like
Report

We can use modular arithmetic to find the remainder when any number is divisible by 6.

To determine if a number is divisible by 6 using modular arithmetic, first break the number into its individual digits based on place value. Then, calculate the powers of 10 modulo 6 for each digit’s place value. For example, 100 (mod 6) = 1, 101 (mod 6) = 4, 102 (mod 6) = 4 and so on.

In modulo 6, the powers of 10 is always equivalent to 4 except 100 which is equivalent to 1. This can be seen in the following table:

10n (mod  6)

100

1

1014
1024
1034
1044
1054
1064
1074

Note: When dividing by 6, the remainder can only be 0, 1, 2, 3, 4, or 5.

Steps to Find Remainder When Dividing by 6

We can use following simple steps for any number to find the remainder when divided by 6.

Step 1: Break down the number into its digits and powers of 10.

Step 2: Calculate the modulo for each term and simplify.

  • To do this, multiply the sum of all digits except the unit digit by 4, then add the unit digit to this sum. This result is equivalent to taking the modulo 6 of the original number.

Example for Finding Remainder When Dividing by 6

To check if 8274736 is divisible by 6 using modular arithmetic, we need to calculate 8274736 (mod 6). If the result is 0, then the number is divisible by 6.

Step 1: Break the number down

We can express 8274736 in terms of its digits and powers of 10:

8274736 = 8 × 106 + 2 × 105 + 7 × 104 + 4 × 103 + 7 × 102 + 3 × 101 + 6 × 100

Step 2: Calculate the sum modulo 7

Now, we calculate the sum using the modular values of the powers of 10.

  • 8274736 (mod 6) = 8 × 106 + 2 × 105 + 7 × 104 + 4 × 103 + 7 × 102 + 3 × 101 + 6 × 100 (mod 6)
  • 8274736 (mod 6) ≣ 8 × 4 + 2 × 4 + 7 × 4 + 4 × 4 + 7 × 4 + 3 × 4 + 6 × 1 (mod 6) [Used values from the the provided table]
  • 8274736 (mod 6) ≣ 4 × (8 + 2 + 7 + 4 + 7 + 3) + 6 (mod 6)
  • 8274736 (mod 6) ≣ 4 × 31 + 6 (mod 6) = 124 + 6 (mod 6) = 130 (mod 6)

Step 3: Calculate 130 (mod 6)

Now, divide 130 by 6 and find the remainder:

130 ÷ 6 = 11 remainder 4

So, 130 (mod 6) ≣ 4 (mod 6)

Thus, 8274736 when divided by 6, leaves 4 as remainder.

Example: Find the remainder when 8173 is divided by 6.

Solution:

8173 = 8 × 103 + 1 × 102 + 7 × 101 + 3 × 100

⇒ 8173 (mod 6) ≣ 8 × 4 + 1 × 4 + 7 × 4 + 3 × 1 (mod 6)

⇒ 8173 (mod 6) ≣ (8 + 1 + 7) × 4 + 3 (mod 6) = 16 × 4 + 3 (mod 6) = 67 (mod 6)

⇒ 8173 (mod 6) ≣ 67 (mod 6) = 1 (mod 6) [as 67 = 6 × 11 + 1]

Thus, Remainder when 8173 is divided by 6 is 1.

Read More,

  • Divisibility Rules
  • Divisibility By 6
  • Remainder When Divided by 2
  • Remainder When Divided by 3
  • Remainder When Divided by 9

Next Article
Remainder When Dividing by 6

S

surajb1g23
Improve
Article Tags :
  • Mathematics
  • School Learning
  • Maths

Similar Reads

    Remainder When Dividing by 5
    The Remainder Rule for 5 is a simple way to find the remainder when divided by 5.Essentially, the remainder when a number is divided by 5 is the same as the remainder when the last digit of the number is divided by 5.The last digit dictates the remainder when dividing by 5, as shown in the table bel
    3 min read
    Remainder When Dividing by 8
    The Remainder Rule for 8 is a straightforward technique to find the remainder when dividing a number by 8.Essentially, the remainder when a number is divided by 8 can be determined by examining the last three digits of that number.While dividing any number by 8, the only possible remainders are 0, 1
    3 min read
    Remainder When Dividing by 4
    When dividing by 4, the remainder helps determine whether a number is fully divisible by 4 or if a smaller remainder is left over. To find the remainder when a number is divided by 4, you can look at the last two digits of the number:If the last two digits form a number that is divisible by 4, the r
    3 min read
    Remainder When Dividing by 7
    To determine if a number is divisible by 7 using modular arithmetic, first break the number into its individual digits based on place value. Then, calculate the powers of 10 modulo 7 for each digit’s place value. For example, 100 (mod 7) ≣ 1, 101 (mod 7) ≣ 3, and so on.Multiply each digit by the cor
    4 min read
    Remainder When Divided by 3
    The Remainder Rule for 3 is a simple way to find the remainder when a number is divided by 3.Essentially, the remainder when a number is divided by 3 is the same as the remainder of the sum of its digits when divided by 3.While dividing any number by 3 the only possible remainders are 0, 1, 2. For E
    4 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences