Solution:
a) Set Sn=1+21+⋯+n1. We have that S2=23, S7=1403121,
S22−S7=81+221+101+201+111+191+141+161+131+171+91+121+151+181+211=b30a+14051=d3c
where (a,b)=(c,d)=1. It is easy to see that a≡b(mod3). Hence 3∤c,d, c≡d(mod3), p22=3p22′ and 3∤p22′. Similarly, we have that S67−S22=f90e+dc, where 3∤f. It follows that 3∤p67,q67.
b) Set Sn=3mnlnkn, where 3∤kn,ln. Then
S3n=3Sn+1+21+41+51+⋯+3n−21+3n−11=3mn+1lnkn+3⋅bnan=3mn+1lnbnknbn+3mn+2lnan
where 3∤bn. Therefore, if mn≥−1, then m3n=mn+1. Analogously, we have that m3n+2=mn+1 for mn≥−1 and m3n+1=mn+1 for mn≥0. Since m1=0, m2=m7=m22=−1 and m67=0, it is easy to see that the answer is n=2,7,22.