Re: A positive integer is divisible by 3 if and only if the sum of its dig
[#permalink]
01 Dec 2021, 02:17
Divisibility by 3 can be easily checked without adding all the digits of a large number:
Say the number is 36275981720160
Now rather than adding all the digits, simply ignore digits if they are multiples of 3. Also ignore some digits if their sum is a multiple of 3.
What I mean is this: Go one digit at a time
3 - Ignore
6 - Ignore
2 + 7 = 9 - Ignore
5 - Hold
9 - Ignore
8 + 1 - Ignore
7 + 2 - Ignore
1 + 5 (which you were holding) = 6 - Ignore
6 - Ignore
0 - Ignore
You are not holding anything so the number is divisible by 3.
Similarly, when you have a number such as 1k2k24,
1+2 = 3 - Ignore
2+4 = 6 - Ignore
So if k is a multiple of 3, then the number will be divisible by 3, else it will not be. There are 4 single digit multiples of 3: 0, 3, 6, 9
Hence k can take 4 values.