p = (1 + 31) + (32 + 33) + ...+ (398 + 399) = 4.1 + 32.(1+ 31) + ...+ 398.(1+ 31) = 4.1 + 32.4 + ....+ 398.4
= 4. (1 + 32 + 34 + ...+ 398) chia hết cho 4
=> p chia hết cho 4
p = (1+ 31+ 32 + 33) + (34 + 35 + ...+ 37) + ...+ (396 + 397 + 398 + 399)
= 40 + 34.(1 + 31 + 32+ 33) + ....+ 396. (1+31 + 32 + 33)
= 40 + 34. 40 + ....+ 396.40 = 40.(1 + 34 + ...+ 396) chia hết cho 40
=> p chia hết cho 40