(*) how many nonempty subsets of {1, 2, 3, . . . , 1000} have a sum which is divisible by p that p is an odd prime?
I have tried p=3,5,7 and the number of subsets is 1,3,9 respectively. I have thought of if the answer is 3p−32, but I am pretty not sure. If anyone knows the answer or find the number of subsets when p is other odd primes, please tell me. Thank you!