If we form numbers by entering digits in row or column wise in calculator numpad the resulting number is divisible by 3 exactly two times not more or less than that. Lets consider this numpad

7 8 9
4 5 6
1 2 3

Rule 1 Pattern should be same while choosing digits from the rows or columns. Suppose we are choosing digits row wise So if we take 1st digit of a row then 3rd and then 2nd digit of that row, then for other two rows we must take 1st digit and then 3rd and then 2nd digit. For example we can take 213546879 it is divisible by 3 exactly two times. Similarly if we choose column wise 396174285 it is also divisible by 3 exactly two times. But we can not take 546312789 here we took 2nd digit "5" from 2nd row then 1st digit "4" and then 3rd digit "6". But then we took 3rd digit "3" from 3rd row instead of taking 2nd digit "2". And therefore 546312789 is not divisible by 3 exactly two times. It is divisible by 3 three times. Rule 2 Either we can select all digits row wise or column wise. It will not work if we choose numbers randomly like 753489621 is divisible by 3 four times and 753162489 is divisible by 3 three times.

So if we form a number by selecting digits from rows or columns in same pattern the number is always divisible by 3 exactly two times not more or less than that. Here are few more examples


2 Answers 2


In (for example) $132798465$, the numbers $132,465,$ and $798$ differ by $333$. (This will always be the case when you are choosing from the rows.) So you can write

$$132798465=132132132+666333=132\times 1001001 + 666333$$

Now both $132$ and $1001001$ are divisible by $3$ but not $9$, so their product is divisible by $9$ but not $27$. And $666333$ is divisible by $27$. So their sum is divisible by $9$ but not $27$.

In general, we get a sum of the form:

$abc\times 1001001+666\times($some power of $10^3)+333\times($some power of $10^3)$

Because $abc$ is a permutation of $123$, it is divisible by $3$ but not $9$; and because $10^3\equiv 1\bmod 27$, we get

$666\times($some power of $10^3)+333\times($some power of $10^3)\equiv 666+333\equiv 999\equiv 0\bmod 27$

If you choose the numbers from the columns instead, it's a bit different. Here is an example:


Both of the summands are equal to $9$ mod $27$. I will let you work out the details.


Here is one explanation, by no means I claim it is the simplest one. It is just the one I could think of.

For going "down" columns: it is a consequence of:

  • $1000\equiv 1\pmod{27}$ ($999$ is divisible by $27$), so $1,000,000\equiv 1\pmod{27}$ too, and so it doesn't matter if you are looking at number $147,258,369$ or at the (much smaller) $147+258+369$ - which is the same taken in any order, so for the original numbers we don't need to care about the order of the columns either;
  • If you swap two rows (e.g. $123$ by $456$), the change of the value in each $3$-digit number from the previous point is the same, and is divisible by $9$ because the sum of the digits stays the same - in effect the total sum changes by a triple of a multiple of $9$, which is a multiple of $27$. This means, if it was previously divisible by $9$ but not by $27$ it stays that way.

For example, conversion of $147,258,369$ into $741,852,963$ (with respect to divisibility by $9$ and $27$) amounts to a change between $147+258+369$ and $741+852+963$, which is $(741-147)+(852-258)+(963-369)=3\times 594$ (and $594$ is divisible by $9$).

This means that, if in one particular order you get a number divisible by $9$ but not by $27$, in every order you will get the same. It is now sufficient to just check that $147,258,369\equiv 18\pmod{27}$.

One can easily apply the same argument for numbers obtained going "across" rows.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.