Consider the geometric sequence $a_n:=ar^{n1}$, $n=0,1,\ldots$.
We know that the product $\Pi_{i=0}^n a_i=(\sqrt{a_1\cdot a_{n+1}})^{n+1}$.
Is there a formula for $\Pi_{i=0}^n (1a_i)$?
Consider the geometric sequence $a_n:=ar^{n1}$, $n=0,1,\ldots$. We know that the product $\Pi_{i=0}^n a_i=(\sqrt{a_1\cdot a_{n+1}})^{n+1}$. Is there a formula for $\Pi_{i=0}^n (1a_i)$? 


In a standard $q$notation, the product of your interest is $$ (z;q) _ n:=\prod_{j=0}^{n1}(1zq^j). $$ The formula known as the $q$binomial theorem expresses this product as sum: $$ (z;q) _ n=\sum _{k=0}^n {\genfrac{[}{]}{0pt}{}{m}{n}} _q (z)^kq^{k(k1)/2}, $$ where the $q$binomial coefficients are defined, e.g., in this question. 


If $a = 1$ you get $\displaystyle \left(1 + \frac{1}{r}\right)\cdot 0 \cdot \prod_{i=k}^n (1 + r^k)= 0$. The last factor is a generating function (free book inside!) counting the number of partitions of $k$ into distinct parts with parts at length at most $n$. Let's look at the partitions of $5$.
\[ (5) \quad (4+1)\quad (3+2)\quad (3+1+1)\quad (2+2+1)\quad (2+1+1+1)\quad (1+1+1+1+1)\]
This would appear as the $r^5$ term in that series. However, many of these do not have distinct parts. So we rule out the last four.
\[ (5) \quad (4+1)\quad (3+2)\]
However, with your two additional factors, you're allowing upto one $0$ and one $1$ in your partition. Your sequence begins $\frac{a}{r}, a, ar, ar^2, ar^3, \dots $. The coefficient of $\displaystyle \prod_{i=0}^n (1 + br^{i1})$ gives a weighted sum of partitions into distinct parts. Let's show how that count works. (NOTE: my $b$ is your $a$).
Two guys who study partitions for a living are Herbert Wilf and George Andrews 

