Arithmetic · real student question

Find a three-digit number A such that the sum of the digits of A is divisible by 5, the sum of the digits of A + 4 is divisible by 5, and A is greater than 350 and less than 400.

Question

Find a three-digit number AA with all three properties:

  • the sum of the digits of AA is divisible by 55;
  • the sum of the digits of A+4A+4 is divisible by 55;
  • 350<A<400350<A<400.

Step-by-step solution

  1. Fix the hundreds digit from the range. Any AA with 350<A<400350<A<400 starts with 33, so write A=3abA=\overline{3ab} with the tens digit a{5,6,7,8,9}a\in\{5,6,7,8,9\} and the units digit b{0,,9}b\in\{0,\ldots,9\}. The digit sum is S=3+a+bS=3+a+b.

  2. Understand what adding 4 does to the digit sum. There are only two cases:

    • If b5b\le 5, no carry happens and the digit sum rises by 44: SS+4S\to S+4.
    • If b6b\ge 6, the units digit wraps and the tens digit gains 11, so the digit sum changes by 410+1=54-10+1=-5: SS5S\to S-5.

    This is the crux. If 5S5\mid S, then S+4S+4 is never a multiple of 55, but S5S-5 always is.

  3. Conclude that a carry is mandatory. The first case is impossible, so we need b6b\ge 6 — and, to keep the tens digit from carrying too, a8a\le 8 (a tens digit of 99 would roll over into the hundreds and change the arithmetic again).

  4. Impose the digit-sum condition. With b{6,7,8,9}b\in\{6,7,8,9\} and a{5,6,7,8}a\in\{5,6,7,8\}, require

    3+a+b0(mod5).3+a+b\equiv 0\pmod 5.

    The pairs that work are (a,b)=(5,7)(a,b)=(5,7) giving S=15S=15, (6,6)(6,6) giving S=15S=15, and (8,9)(8,9) giving S=20S=20.

  5. List and check the solutions.

    A=357: 3+5+7=15,3613+6+1=10 A=357:\ 3+5+7=15,\quad 361\to 3+6+1=10\ \checkmark
    A=366: 3+6+6=15,3703+7+0=10 A=366:\ 3+6+6=15,\quad 370\to 3+7+0=10\ \checkmark
    A=389: 3+8+9=20,3933+9+3=15 A=389:\ 3+8+9=20,\quad 393\to 3+9+3=15\ \checkmark

    A brute-force scan of every integer from 351351 to 399399 confirms these are the only three. Any one of them answers the question.

Answer

A{357, 366, 389}A\in\{357,\ 366,\ 389\}

Need to solve a different problem like this? Open the solver →