We can factor this as where means that but . Clearly the product is unless for each . Hence the sum is if is not divisible by a -power (other than ), and otherwise.
Well it's more that I'm assuming the reader will have no trouble convincing him/herself of it!
Each term in the sum is , where and is such that . In the product I wrote, the term will be obtained as once the product is expanded. Conversely, each term in the expansion of the product can be found in the sum.