Solution:
Concept:
- Sum of a G.P.: the first n terms of a G.P. with first term a and common ratio r=1 add up to Sn=r−1a(rn−1).
- A number made of k sevens is 7×k11…1, and k99…9=10k−1, so k11…1=910k−1.
Step 1 — Write the k-th term.
We take out the common factor 7 and write each repunit with powers of 10.
Sn=7(1+11+111+…)=97(9+99+999+…)=97[(10−1)+(102−1)+⋯+(10n−1)]
Step 2 — Separate the parts.
The powers of 10 form a G.P.; the −1 appears n times.
Sn=97[(10+102+⋯+10n)−n]
Step 3 — Sum the G.P.
The G.P. has first term 10, ratio 10 and n terms.
10+102+⋯+10n=10−110(10n−1)=910(10n−1)
Step 4 — Combine.
We multiply out the 97.
Sn=97[910(10n−1)−n]=8170(10n−1)−97n
Step 5 — Check.
For n=2 the series is 7+77, so the formula should give 84. We put n=2 in it.
8170×99−914=9770−914=84
Therefore, Sn=8170(10n−1)−97n.