Sn=7+77+777+7777+……+to n terms
= (7/9) [9+99+999+……+ to n terms]
= (7/9) [(10-1) + (100-1) + (1000-1) +……...+ to n term]
= (7/9) [10+100+1000+……... n terms – (1+1+1+1+…… n terms)
= (7/9) [10+100+1000+………n terms –n]
a=10, r=10
= (7/9) [10(10n−1)9-n]