Divisible by 3?

How many of the following numbers are divisible by 3?

1 12 123 1234 12345 123456 1234567 12345678 123456789 \begin{array}{l} 1 \\ 12 \\ 123 \\ 1234 \\ 12345 \\ 123456 \\ 1234567 \\ 12345678 \\ 123456789 \\ \end{array}

3 4 5 6

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

7 solutions

Venkatachalam J
May 31, 2017

Relevant wiki: Divisibility Rules (2,3,5,7,11,13,17,19,...)

Using the below logic, we can use the previous calculation of the divisibility by 3 for the next number.

Hi Venka, great explanation. I like the visual aspect which makes your explanation immeidately apparent.

Richard Fleay - 4 years ago
Sathvik Acharya
May 25, 2017

To check for divisibility of 3, you must add the digits of the number and if the digital sum is divisible by 3, then the number is divisible by 3.

Checking each of the digital sums,

1 1 1- 1 not divisible by 3

12 1 + 2 = 3 12-1+2=3 divisible by 3

123 1 + 2 + 3 = 6 123-1+2+3=6 divisible by 3

1234 1 + 2 + 3 + 4 = 10 1234-1+2+3+4=10 not divisible by 3

12345 1 + 2 + 3 + 4 + 5 = 15 12345-1+2+3+4+5=15 divisible by 3

123456 1 + 2 + 3 + 4 + 5 + 6 = 21 123456-1+2+3+4+5+6=21 divisible by 3

1234567 1 + 2 + 3 + 4 + 5 + 6 + 7 = 28 1234567-1+2+3+4+5+6+7=28 not divisible by 3

12345678 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 = 36 12345678-1+2+3+4+5+6+7+8=36 divisible by 3

123456789 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 = 45 123456789-1+2+3+4+5+6+7+8+9=45 divisible by 3

Therefore 6 \boxed{6} of the above numbers are divisible by 3

Note: To calculate the digital sums you can use the formula n ( n + 1 ) 2 \frac{n(n+1)}{2}

Divisible ( not diverse sable!! Autocorrect..) 😂

Jacqueline Spence - 4 years ago

Save some work and when you know the previous number is divisible by three discard all those numbers. Good example is 1 + 2 + 3 + 4 + 5 = 15.

When you go to 6 you can forget about 1 - 5

When you go to 7 it fails since you discard everything before 6.

When you go to 8, 7 + 8 = 15

When you go to 9 discard everything before 9, so :)

10 is not, based on discarding everything before 10.

11 is because 10 + 11 is 21 and so on. Much less work.

Note below is based on adding everything before it:

12 good

13 bad

14 good

15 good

16 bad

17 good

18 good

You get the idea.

Eric Belrose - 4 years ago

Log in to reply

I think what you want to say is that it's simpler if you keep a running total of the digital sum. Or, better yet, keep a running total of the digital sum (mod 3).

Richard Desper - 4 years ago

Log in to reply

No I mean that you forget about the preceding numbers in the sequence as soon as you find a sum that is divisible by three you only deal with the subsequent sum until you find something divisible by three.

So in computer thinking:

Scenerio 1: False (Sum = 1)

Scenerio 2: True (Sum = 3) which equals 0 mod 3 (that part is right)(conditionally Set Sum to 0)

Scenerio 3: True (Sum = 3) (Conditionally set sum to 0)

Scenerio 4: False (Sum = 4)

Scenerio 5: True (Sum = 9) (mod 3 = 0) set sum to 0

Scenerio 6: True (Sum = 6) set sum to 0

This is how I did it in my head. So without the computer this methodology was simpler for even high numbers you can continue to eliminate the preceding sum. Then you can use the 3 trick to test them no matter how big the number. So I eliminate part of the digital sum everytime I hit a mod 3 = 0 (sorry for the lack of equivalence symbols). But you are sort of correct. I thought the initial explanation was pretty clear anyways. The "Better yet" statement was definitely a more accurate portrayal of what was happening. But Computer Science is my field so I think of everything algorithmically. The outcome isn't as important as the efficiency of the method.

Eric Belrose - 4 years ago

Log in to reply

@Eric Belrose Mod 3 would be easier if implemented but mechanically unless you are a computer it is difficult to ascertain when the sum exceeds 4 or 5 digits. (I know not required for this question)

Eric Belrose - 4 years ago

They are all diverse sable by three. Maybe not resulting in whole numbers, but that was not a requirement of the question.

Jacqueline Spence - 4 years ago

Log in to reply

When you check whether a number is divisible, you always talk about resulting in whole numbers. No need to say that extra :)

Peter van der Linden - 4 years ago

In mathematics, "X is divisible by X" is defined as X is capable of being divided without remainder by Y.

A W - 3 years, 12 months ago
Michael Wortman
May 29, 2017

The correct answer is 9. They are all divisible by 3 Only 6 are evenly divisible by 3..... But that is not what the question asked.

Moderator note:

In mathematics, " X X is divisible by Y Y " is defined as X X is capable of being divided without remainder by Y . Y.

Mathematicians conventionally use the definition of divisibility in which the remainder is 0. https://brilliant.org/discussions/thread/number-theory-divisibility/

Kevin Weatherwalks - 4 years ago
Aneesh Saripalli
Jun 1, 2017

Because divisibility by 3 is the sum of the digits, we can check the sum of the digits for divisibility by 3. Instead of checking all the sums, we can recognize that the sum of consecutive digits (which these are) is n ( n + 1 ) / 2 n(n+1)/2 . Hence divisibility occurs when either n or n+1 is a multiple of 3. This happens at 2,3,5,6,8,9 => 6 .

Majed Kalaoun
May 31, 2017

An integer is divisible by 3 only when the sum of its digits is divisible by three. For instance, 27 is divisible by 3 because 2+7=9 and 9 is divisible by 3.

  • 1 1 - 1 1 and 1 1 isn't divisible by 3
  • 12 12 - 1 + 2 = 3 1+2=3 is divisible by 3
  • 123 123 - 1 + 2 + 3 = 6 1+2+3=6 is divisible by 3
  • 1234 1234 - 1 + 2 + 3 + 4 = 10 1+2+3+4=10 is not divisible by 3
  • 12345 12345 - 1 + 2 + 3 + 4 + 5 = 15 1+2+3+4+5=15 is divisible by 3
  • 123456 123456 - 1 + 2 + 3 + 4 + 5 + 6 = 21 1+2+3+4+5+6=21 is divisible by 3
  • 1234567 1234567 - 1 + 2 + 3 + 4 + 5 + 6 + 7 = 28 1+2+3+4+5+6+7=28 is not divisible by 3
  • 12345678 12345678 - 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 = 36 1+2+3+4+5+6+7+8=36 is divisible by 3
  • 123456789 123456789 - 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 = 45 1+2+3+4+5+6+7+8+9=45 is divisible by 3

Therefore, there are a total of 6 integers that are divisible by three from the list.

Actually all of these numbers are divisible by 3. Only six are EVENLY divisible by 3. Small distinction but an important one.

In mathematics, "X is divisible by Y" is defined as X is capable of being divided without remainder by Y.

A W - 3 years, 11 months ago
Greg Goodwin
May 31, 2017

Really all of them can be divided by 3, as the question does not specify that the answer is an integer...

In mathematics, if say, x x is divisible by b b , then b b can fit into x x with no remainder.

Majed Kalaoun - 4 years ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...