.
Task. Find number s of selections of three different numbers from set A={1,2,3,....,101} so that they form an ariphmetic progression.
Solution. We should choose numbers of the form (a,a+d,a+2d) for some a∈A and d>0. In particular, this implies that
1≤a≤a+2d≤101.
For each a∈A let sa be the number of d>0 satisfying the inequaly above: a+2d≤101. Then
s=∑a=1101sa.
Notice that a+2d≤101 implies that
2d≤101−a⇒d≤2101−a.
Thus
1≤d≤2101−a,
and so
sa=[2101−a],
where [x] is the integer part of x, e.g. [3.5]=3.
Suppose a=2k+1 is odd. Then
sa=[2101−a]=[2101−2k−1]=[2100−2k]=50−k.
In particular,
s1=s2∗0+1=50−0=50,
s3=s2∗1+1=50−1=49,
………………
s99=s2∗49+1=50−49=1,
s101=s2∗50+1=50−50=0.
Recal that
1+2+⋯+n=∑i=1ni=2n(n−1)
as the sum of first n members of ariphmetic progression 1,2,3,…
Hence
sodd=∑a≤101, a is oddsa=∑n=050k=250∗(50−1)=1225.
Now let a=2k be even Then
sa=[2101−a]=[2101−2k]=[2101−2k]=[50.5−k]=[50−k+0.5]=50−k.
In particular,
s2=s2∗1=50−1=49,
s4=s2∗2=50−2=48,
………………
s98=s2∗49=50−49=1,
s100=s2∗50=50−50=0.
Hence
seven=∑a≤100, a is evensa=∑n=049k=249∗(49−1)=1176.
Thus
s=sodd+seven=1225+1176=2401.
Comments