My Math Forum

My Math Forum (
-   Number Theory (
-   -   Minimum value of D (

K Sengupta March 4th, 2009 06:22 AM

Minimum value of D
Two consecutive positive decimal integers D and D+1 are such that the sum of the digits of each of them is divisible by 13.

What is the minimum value of D?

CRGreathouse March 4th, 2009 07:33 AM

Re: Minimum value of D
Let sod(n) be the sum of the base-10 digits of n.

Unless D ends in 9 (is 9 mod 10), sod(D) + 1 = sod(D+1). If D ends in 9, but not in 99, sod(D) = sod(D+1) + 8. Generalizing, if D ends in precisely k (not k+1) 9s, sod(D) = sod(D+1) + 9k - 1.

Can you solve it from here?

K Sengupta March 5th, 2009 06:12 AM

Re: Minimum value of D

Originally Posted by CRGreathouse
sod(D) = sod(D+1) + 9k - 1.


From this point onwards, we note that since each of sod(D) and sod(D+1) is divisible by 13, it follows that 9k 1 is divisible by 13. The minimum value of k for which this is possible occurs at k=3.

Accordingly, D = X1X2.Xm999, where none of X1, X2, ., Xm is 9.
-> D+1 = X1X2.X(m-1)(Xm + 1)000, with the restriction that: (1 + Sum(i=1 to m) Xi) is divisible by 13.

We now observe that (D+1) minimized whenever m=2, with: (X1, X2) = (4,8).

Therefore, D+1 = 49000, giving: D = 48999

Consequently, the minimum value of D in conformity with the given conditions is 48999.

All times are GMT -8. The time now is 09:40 AM.

Copyright © 2019 My Math Forum. All rights reserved.