{{searchResults.length}} {{searchResults.length === 1 ? 'result' : 'results'}} for “{{searchWords}}”No results found for “{{searchWords}}”× back to contents
The product is $2^a3^b5^c$, where $b$ counts the dice showing $3$ or $6$ and $c$ counts the dice showing $5$, so $b+c\le n$. The other $n-b-c$ dice contribute $0$, $1$, or $2$ to $a$, and the $b$ dice contribute $0$ or $1$, so $a$ can be any of $0,1,\dots,2n-b-2c$.
With $m=n-c$, the number of products is $\sum_{m=0}^{n}\sum_{b=0}^{m}(2m-b+1)=\sum_{m=0}^{n}\frac{(m+1)(3m+2)}2=\frac{(n+1)^2(n+2)}2$.
This increases with $n$, and $(n+1)^2(n+2)=392=7^2\cdot8$ gives $n=\boxed{6}$.