a) Set S=a+11+a+21+a+31 and notice that a+33<S<a+13 to infer from 41<S<31 that 41<a+13 and a+33<31. Consequently 6<a<11, so a∈{7,8,9,10}. It is easy to check that a=7 fails and 8,9,10 are solutions.
b) Select a1=p2+1,a2=p2+2,…,ap=p2+p to get
S=a11+a21+⋯+ap1=p2+11+p2+21+⋯+p2+p1
and notice that
p2+11>p2+21>⋯>p2+p1
implies
p2+pp<S<p2+1p<p2p=p1.