1 | initial version |
Use something like this:
sage: N = 20
sage: q = QQ[['q']].gen().O(N)
sage: f = prod((1-q**(2*i))/(1-q**(3*i)) for i in range(1, N+1))
sage: f
1 - q^2 + q^3 - q^4 - q^5 + 2*q^6 - q^7 - 2*q^8 + 3*q^9 - q^10 - 3*q^11 + 5*q^12 - 2*q^13 - 4*q^14 + 7*q^15 - 3*q^16 - 6*q^17 + 11*q^18 - 4*q^19 - 9*q^20 + O(q^21)