Understand the problem

The three-digit number 999 has a special property: It is divisible by 27, and its digit sum is also divisible by 27. The four-digit number 5778 also has this property, as it is divisible by 27 and its digit sum is also divisible by 27. How many four-digit numbers have this property?
Source of the problem
Israel 2014, Problem 4
Combinatorics, Number Theory
Difficulty Level
Suggested Book
Excursion in Mathematics by Bhaskarcharya Prathistan

Start with hints

Do you really need a hint? Try it first!

Let’s write the problem mathematically, i.e. in terms of the equations. Let’s write the condition mathematically. Let $abcd$ be a four-digit number, with $1\le a\le9$ and $0\le b,c,d\le 9$, and $a,b,c,d$ positive integers. Then we need to have $1000a+100b+10c+d=27n$ and $a+b+c+d=27m$, where $n,m$ are positive integers.  Now, we have to count the number of such solutions. Observe that the sum of the digits can be at most 36. So, m = 1. Hence, a+b+c+d = 27. This leads to $111a+11b+c=3(n-1)$ . This implies  $2b+c$ being a multiple of $3$.  Now, this implies we have quite a number of cases to investigate. Let’s do them one by one patiently.
b c a+d
0 3,6,9 27,24,21,18
Out of this b = 0, c = 9, a+d = 18, a = 9, c =9 is the only possibility considering the maximum possibble value of a+d being 18.  
b c a+d
1 1,4,7 25,22,19
  None of the cases is fine as the maximum possible value of a+d is 18.
b c a+d
2 2,5,8 23,20,17
This gives rise to b = 2, c = 8, a+d = 17. Hence two solutions 8289 and 9288.
b c a+d
3 0,3,6,9 24,21,18,15
Thus you can understand this gives rise to 4 solutions: ($6399,7398,8397$ and $9396$)
b c a+d
4 1,4,7 22,19,16
This gives rise to three solutions: ($7479,8478,$ and $9477$).
b c a+d
5 2,5,8 20,17,14
Only the last two choices are acceptable; the former gives us two solutions, and the latter 5 (for a total of seven solutions).  
b c a+d
6 0,3,6,9 21,18,15,12
 The last three choices are acceptable and give us $1+4+7=12$ solutions.
b c a+d
7 1,4,7 19,16,13
The last two choices are acceptable and give us $3+6=9$ solutions.
b c a+d
8 2,5,8 17,14,11
All choices are acceptable and give us $2+5+8=15$ solutions.
b c a+d
9 0,3,6,9 18,15,15,9
All choices are acceptable and give us $1+4+7+9=21$ solutions. Therefore, there are $1+2+5+3+7+12+9+15+21=75$ four-digit numbers with this property.

Watch video

Connected Program at Cheenta

Math Olympiad Program

Math Olympiad is the greatest and most challenging academic contest for school students. Brilliant school students from over 100 countries participate in it every year. Cheenta works with small groups of gifted students through an intense training program. It is a deeply personalized journey toward intellectual prowess and technical sophistication.

Similar Problems

A trigonometric polynomial ( INMO 2020 Problem 2)

Indian National Math Olympiad (INMO 2020) Solution and sequential hints to problem 2

Kites in Geometry | INMO 2020 Problem 1

Try this beautiful geometry problem from INMO (Indian National Math Olympiad) 2020). We provide solution with sequential hints so that you can try.

Geometry of AM GM Inequality

AM GM Inequality has a geometric interpretation. Watch the video discussion on it and try some hint problems to sharpen your skills.

Geometry of Cauchy Schwarz Inequality

Cauchy Schwarz Inequality is a powerful tool in Algebra. However it also has a geometric meaning. We provide video and problem sequence to explore that.

RMO 2019 Maharashtra and Goa Problem 2 Geometry

Understand the problemGiven a circle $latex \Gamma$, let $latex P$ be a point in its interior, and let $latex l$ be a line passing through $latex P$.  Construct with proof using a ruler and compass, all circles which pass through $latex P$, are tangent to $latex...

RMO 2019 (Maharashtra Goa) Adding GCDs

Can you add GCDs? This problem from RMO 2019 (Maharashtra region) has a beautiful solution. We also give some bonus questions for you to try.

Number Theory, Ireland MO 2018, Problem 9

This problem in number theory is an elegant applications of the ideas of quadratic and cubic residues of a number. Try with our sequential hints.

Number Theory, France IMO TST 2012, Problem 3

This problem is an advanced number theory problem using the ideas of lifting the exponents. Try with our sequential hints.

Algebra, Austria MO 2016, Problem 4

This algebra problem is an elegant application of culminating the ideas of polynomials to give a simple proof of an inequality. Try with our sequential hints.

Number Theory, Cyprus IMO TST 2018, Problem 1

This problem is a beautiful and simple application of the ideas of inequality and bounds in number theory. Try with our sequential hints.