How many four-digit positive integers divisible by 7 have the property that, when the first and last digits are interchanged, the result is a (not necessarily four-digit) positive integer divisible by 7?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Relevant wiki: Application of Divisibility Rules
It is easy to see, that if two integers are both divisible by 7, then their difference is also divisible by 7.
a b c d − d b c a = 1 0 0 0 a + 1 0 0 b + 1 0 c + d − ( 1 0 0 0 d + 1 0 0 b + 1 0 c + a ) = 9 9 9 ( a − d )
As 999 is not divisible by 7, therefore 7 ∣ ( a − d ) .
Now, we have the following cases:
I. a − d = 0 ⟺ a = d
As 7 ∣ 1 0 0 1 ( and so are the multiples of 1001), therefore we have a solution if and only if the (not necessarily two digit, e.g. 00 or 07) number formed of the middle two digits ( b c ) is divisible by 7.
We have 15 solutions ( b c = 7 k , k ∈ Z , 0 ≤ k ≤ 1 4 ) per value of digit a, and
9 × 15 = 135 solutions altogether in this case.
II. a - d = ±7
As a ∈ {1,2,3,4,5,6,7,8,9} , the possible (a,d) values are (1,8), (8,1), (2,9), (9,2) and (7,0).
Since 1008, 8001, 2009, 9002 and 7000 are all divisible by 7, we have a solution (similarly to case I.) iff 7 ∣ b c
This means, that we have 15 solutions per pair of (a,d) values and
5 × 15 = 75 solutions altogether in this case.
Therefore, the total number of solutions is:
1 3 5 + 7 5 = 2 1 0