от nevrodermit » 31 Май 2016, 09:23
Let one of them is [tex]\overline{abcd}=10^4a+10^3b+10c+d[/tex] (1).
Since the sum of the digits is [tex]29[/tex] we have [tex]d=29-a-b-c[/tex] and putting it back into (1) we get
[tex]\overline{abcd}=1000a+100b+10c+29-a-b-c=999a+99b+9c+29[/tex] and hence [tex]111a+11b+c \equiv 0 \pmod{29}\Leftrightarrow 24a+11b+c\equiv 0 \pmod{29}[/tex].
We have [tex]24\le 24a+11b+c\le 9.36[/tex] and since [tex]\frac{9.36}{29}\approx 11.1[/tex]
Also note that [tex]d[/tex] is a digit and hence [tex]0\le 29-a-b-c\le 9\Leftrightarrow 20 \le a+b+c\le 29[/tex] (2)
Clealy, if [tex]a\le2[/tex] we don't have a solution because otherwise it would mean [tex]b+c\ge 18\Rightarrow b=c=9, a=2[/tex] but [tex]2999[/tex] is not divisible by [tex]29[/tex].
So [tex]a\ge 3[/tex] and so [tex]24a+11b+c\ge 72[/tex].
So [tex]24a+11b+c\in \{87, 116, 145, 174, 203, 232, 261, 290, 319\}[/tex].
We have to investigate each of these cases.
1) [tex]24a+11b+c=87[/tex]
Clearly, [tex]a=3\Rightarrow 11b+c=15\Rightarrow b=1, c=4\Rightarrow a+b+c=8[/tex] - conflict with (2)
2) [tex]24a+11b+c=116[/tex]
If [tex]a=3\Rightarrow 11b+c=44, b+c\ge 17\Rightarrow[/tex] one among [tex]b,c[/tex] is [tex]8[/tex] the other is [tex]9[/tex] (or both 9) which is impossible for [tex]11b+c=44[/tex]
If [tex]a=4\Rightarrow 11b+c=20\Rightarrow b=1, c=9[/tex] and again their sum is [tex]14<20[/tex]
3) [tex]24a+11b+c=145[/tex]
If [tex]a=3\Rightarrow 11b+c=73[/tex] and [tex]b+c\ge 17[/tex] so one is [tex]8[/tex] and the other is [tex]9[/tex] (or both 9) which is impossible for [tex]11b+c=73[/tex]
If [tex]a=4\Rightarrow 11b+c=49[/tex] and [tex]b+c\ge 16[/tex]. Clearly, [tex]b\le 4\Rightarrow c\ge 12[/tex] impossible
If [tex]a=5\Rightarrow 11b+c=25[/tex] and [tex]b+c\ge 15[/tex]. Clearly, [tex]b=2\Rightarrow c=3[/tex] - again from (2) impossible
If [tex]a=6\Rightarrow 11b+c=1\Rightarrow b=0, c=1[/tex] again from (2) impossible
4) [tex]24a+11b+c=174[/tex]
If [tex]a=4\Rightarrow 11b+c=102[/tex] and so [tex]b=9\Rightarrow c=3, a+b+c=16<20[/tex] impossible from (2)
If [tex]a=5\Rightarrow 11b+c=54[/tex] and so [tex]b=4\Rightarrow c=10[/tex] impossible
If [tex]a=6\Rightarrow 11b+c=30\Rightarrow b=2\Rightarrow c=8\Rightarrow a+b+c<20[/tex] impossible
If [tex]a=7\Rightarrow 11b+c=6\Rightarrow b=0,c=6\Rightarrow a+b+c<20[/tex] impossible
5) [tex]24a+11b+c=203[/tex]
If [tex]a=4\Rightarrow 11b+c=107\Rightarrow b=9, c=8, d=8[/tex] and hence one solution [tex]4988[/tex]
If [tex]a=5\Rightarrow 11b+c=83\Rightarrow b=7, c=6\Rightarrow a+b+c<20[/tex] impossible
If [tex]a=6\Rightarrow 11b+c=59\Rightarrow b=5, c=4\Rightarrow a+b+c<20[/tex] impossible
If [tex]a=7\Rightarrow 11b+c=35\Rightarrow b=3, c=2\Rightarrow a+b+c<20[/tex] impossible
If [tex]a=8\Rightarrow 11b+c=11\Rightarrow b=1,c=0\Rightarrow a+b+c<20[/tex] impossible
6) [tex]24a+11b+c=232[/tex]
If [tex]a=4\Rightarrow 11b+c=160[/tex] but [tex]11b+c\le 11.9+9=108[/tex] impossible
If [tex]a=5\Rightarrow 11b+c=112[/tex] - as above
If [tex]a=6\Rightarrow 11b+c=88\Rightarrow b=8, c=0[/tex] - impossible from (2)
If [tex]a=7\Rightarrow 11b+c=64\Rightarrow b=5,c=9\Rightarrow d=8[/tex] and hence one solution [tex]7598[/tex]
If [tex]a=8\Rightarrow 11b+c=40\Rightarrow b=3, c=7[/tex] impossible from (2)
If [tex]a=9\Rightarrow 11b+c+16\Rightarrow b=1,c=5[/tex] impossible from (2)
7) [tex]24a+11b+c=261[/tex]
Generally, [tex]11b+c\le 12.9=108\Rightarrow 24a\ge 261-108\Rightarrow a\ge 7[/tex]
If [tex]a=7\Rightarrow 11b+c=93\Rightarrow b=8, c=5, d=9[/tex] and hence one solution [tex]7859[/tex]
If [tex]a=8\Rightarrow 11b+c=69\Rightarrow b=6, c=3[/tex] impossible from (2)
If [tex]a=9\Rightarrow 11b+c=45\Rightarrow b=4, c=1[/tex] impossible from (2)
8) [tex]24a+11b+c=290[/tex]
Generally, [tex]11b+c\le 108\Rightarrow 24a\ge 182\Rightarrow a\ge 8[/tex]
If [tex]a=8\Rightarrow 11b+c=98\Rightarrow b=8, c=10[/tex] impossible
If [tex]a=9\Rightarrow 11b+c=74\Rightarrow b=6, c=8, d=6[/tex] and hence one solution [tex]9686[/tex]
9) [tex]24a+11b+c=319[/tex]
Again, [tex]24a\ge 211\Rightarrow a\ge 9[/tex]
If [tex]a=9\Rightarrow 11b+c=103\Rightarrow b=9,c=4,d=7[/tex] and hence one solution [tex]9947[/tex]