Problem:
Let S={20,21,22,β¦,210}. Consider all possible positive differences of pairs of elements of S. Let N be the sum of all of these differences. Find the remainder when N is divided by 1000.
Solution:
For nβ₯1, let Tnβ denote the sum of all positive differences of all pairs of elements of the set {20,21,22,β¦,2n}. Given two elements in this set, if neither equals 2n, then the difference of these elements contributes to the sumTnβ1β. Thus
Tnββ=Tnβ1β+(2nβ2nβ1)+(2nβ2nβ2)+β―+(2nβ20)=Tnβ1β+nβ
2nβ(2nβ1)β
By applying this recursion repeatedly, it follows that
Tnββ=k=1βnβ(kβ
2kβ2k+1)=k=1βnβkβ
2kβk=1βnβ2k+k=1βnβ1=(k=1βnβkβ
2k)β(2n+1β2)+n=(k=1βnβ(i=kβnβ2i))β(2n+1β2)+n=(k=1βnβ2β12k(2nβk+1β1)β)β(2n+1β2)+n=(k=1βnβ(2n+1β2k))β(2n+1β2)+n=nβ
2n+1β(2n+1β2)β(2n+1β2)+n=(nβ2)2n+1+n+4β
Setting n=10 gives T10β=214+14=16398. Thus the required remainder is 398β.
The problems on this page are the property of the MAA's American Mathematics Competitions