1

$9$ cards are given ($i$-th card represents $i$) and $2$ following numbers are defined by using all $9$ cards.

$a:=5$ digits natural number which are given by concatenating $5$ cards.

$b:=4$ digits natural number which are given by concatenating $4$ cards.

And I have to determine $a$ and $b$ such that $a-b=33333.$

I've read the solution but I can't get the following.

Define $p,q$ as sums of each digit of $a,b$ respectively.

$p-q\equiv 3\times5\equiv 6 \pmod 9$

How this congruence is obtained?.

  • The sum of the digits $s(N)$ of a decimal number $N$ has the property that $N-s(N)$ is zero modulo nine. In our case, working modulo nine: $p-q\equiv s(a)-s(b)\equiv a-b\equiv s(a-b)=s(33333)=3\cdot 5=15\equiv 6$ modulo nine. – dan_fulea Dec 31 '19 at 15:03

1 Answers1

1

The sum of the digits of a number is equivalent to that number modulo $9$ (you can prove this by stating a number generally as $a_n \cdot 10^n + a_{n-1}\cdot 10^{n-1}+\dots + a_0,$ where $a_i\in \{0,1,\dots, 9\}.$ Hence $p\equiv a\pmod 9\wedge q\equiv b\pmod 9\Rightarrow p-q\equiv a-b\pmod 9.$ But $a-b\pmod 9 \equiv 3\times 5\equiv 6\pmod 9$ as $3\times 5$ is the sum of the digits of $33333$.

Simon Fraser
  • 2,528