a) Let n=aq1+r1=bq2+r2, a,b∈N, a<b, r1=0, r2=0. Suppose that n=r1+r2. Then n=aq1+r1=bq2+r2=r1+r2, (q1≥0, q2≥0) and r1<a, r2<b, so bq2=r1<a≤b. The inequality bq2<b holds only if q2=0. But then r1=bq2=b⋅0=0, a contradiction.
b) Let, by condition,
n=29q1+r1=39q2+r2=59q3+r3=r1+r2+r3,
r1<29, r2<39, r3<59. From these inequalities it follows that 59q3=r1+r2≤28+38=66, so q3=1. Then
r1+r2=59.(1)
Further, 39q2=r1+r3≤28+58=86, so q2≤2.
Consider two cases:
1) q2=1. Then
r1+r3=39.(2)
98=59+39=r1+r2+r1+r3=n+r1=29q1+2r1,
i.e., 29q1+2r1=98, so q1 is even and 29q1<98, hence q1=2. Then r1=21(98−2⋅29)=20. But from (1) it follows that r2=59−20=39, which is impossible since r2<39.
2) q2=2. Then
r1+r3=n−r2=39q2=78.(3)
Then from (1) and (3) we obtain 29q1+2r1=137, so q1 is odd and 29q1<137, hence either q1=1 or q1=3. If q1=1, then 2r1=108, i.e., r1=54, a contradiction. If q1=3, then r1=25, r2=34, r3=53, and n=25+34+53=112, which satisfies the problem condition.