Introduction

Welcome back to Divisibility Shortcuts — you are now on lesson four of five, and the finish line is in sight. Over the previous three lessons you picked up quick tests for 22, 55, 1010, 33, 99, and 44, each built on a different feature of the base-ten system. Today's lesson takes a completely different approach: instead of inventing a brand-new trick, you will to test divisibility by . The payoff is a powerful idea — simpler tests can be stacked together to handle a harder divisor, no extra memorization required.

What Makes 6 Special

Before we state the rule, let's think about what the number 66 is made of:

6=2×36 = 2 \times 3

Both 22 and 33 are prime numbers, and you already have a fast test for each one. The insight behind the divisibility rule for 66 is refreshingly simple: if a number can be shared equally into groups of into groups of , then it can also be shared equally into groups of . We don't need a new shortcut at all — we just need to use two shortcuts we already have, together.

The Combined Rule

Here is the rule: a whole number is divisible by 6 if and only if it is divisible by both 2 and 3.

To apply it, run two familiar checks in sequence:

  1. Test for 2 — look at the last digit. If it is even (0,2,4,6,80, 2, 4, 6, 8), the number passes.
  2. Test for 3 — add up all the digits. If the digit sum is divisible by 33, the number passes.

If the number passes both checks, it is divisible by 66. If it fails either one — or both — it is not divisible by .

Why One Test Alone Is Not Enough

It is tempting to think that passing just one of the two tests should be good enough. A quick comparison shows why that reasoning falls apart.

NumberDivisible by 2?Divisible by 3?Divisible by 6?
14Yes (last digit 4)No (digit sum 1+4=51+4=5)No
15No (last digit 5)Yes (digit sum 1+5=61+5=6)No
18Yes (last digit 8)Yes (digit sum )
Packing Eggs into Cartons of Six

Imagine you work in a warehouse that packs eggs into cartons of 66. A shipment of 2,154 eggs arrives and you need to know whether they fill an exact number of cartons with none left over.

Warehouse worker filling 6-egg cartons on a conveyor belt

Step 1 — Test for 2. The last digit of 2,1542{,}154 is 44, which is even. ✓

Step 2 — Test for 3. Add the digits: 2+1+5+4=122 + 1 + 5 + 4 = 12. Since with no remainder, the digit sum is divisible by . ✓

Why Combining Two Tests Works

You might wonder: can we always test a product by testing its factors separately? The answer is yes, but only when the two factors share no common factor other than 1. In mathematical terms, the factors must be coprime — their only shared divisor is 11.

Since 22 and 33 are both prime, they are automatically coprime. That guarantees the following:

divisible by 6    divisible by 2 and divisible by 3\text{divisible by } 6 \iff \text{divisible by } 2 \textbf{ and } \text{divisible by } 3
Quick-Reference Summary

Here is your updated table with every shortcut covered so far:

DivisorWhat to CheckKey Idea
2Last digit is even1010 is divisible by 22
3Digit sum divisible by 33Powers of 1010 leave remainder 11 when divided by 33
Conclusion and Next Steps

In this lesson you learned that divisibility by 6 requires passing two separate tests: the number must be even (divisible by 22) and its digit sum must be divisible by 33. Neither condition on its own is sufficient — both must hold. You also saw the deeper reason this works: because 22 and 33 are coprime, checking each factor individually is enough to guarantee divisibility by their product.

Time to put the two-step check into practice! In the exercises ahead, you will decide which egg quantities fill exact cartons of six, complete partially worked examples that walk through each check, and determine whether real-world shipment sizes pack perfectly into boxes of six.

Sign up
Join the 1M+ learners on CodeSignal
Be a part of our community of 1M+ users who develop and demonstrate their skills on CodeSignal