Skip to main content
2 of 4
added 186 characters in body
Fedor Petrov
  • 108.9k
  • 9
  • 264
  • 459

This is probably not what you look for, but you may denote $N=\prod p_i$, $m_i=N/p_i$, then consider a polynomial $$q(x)=\prod_i (x^{m_i}+x^{2m_i}+\dots+x^{(p_i-1)m_i}).$$ Your generating function equals $$\frac{q(x)\pmod {1-x^{N}}}{1-x^{N}}.$$

Fedor Petrov
  • 108.9k
  • 9
  • 264
  • 459