If $a_1,a_2,...,a_n\in R^+$ and $a_1\cdot a_2\cdots a_n=1$, find the minimum value of $$(1+a_1+a_1^2)(1+a_2+a_2^2)\cdots(1+a_n+a_n^2)$$
My attempt:
I know that since positive reals have been given and a minimum value is asked, we must apply the coveted AM-GM-HM inequality. So, I would say that:
$$\left((1+a_1+a_1^2)(1+a_2+a_2^2)\cdots(1+a_n+a_n^2)\right)^\frac 1n\geq\frac{n}{\frac 1{1+a_1+a_1^2}+\frac 1{1+a_2+a_2^2}+\cdots+\frac 1{1+a_n+a_n^2}}$$
The RHS could be slightly simplified by using the identity $a^3-b^3=(a-b)(a^2+b^2+ab)$, however, I don't know how to proceed further. Any starting hints or theorem involved are sufficient.
By the AM-GM inequality, we know that $$ 1 + a_i + a_i^2 \geq 3 \sqrt[3]{1 \cdot a_i \cdot a_i^2} = 3a_i. $$
We thus have that $$ (1 + a_1 + a_1^2)(1 + a_2 + a_2^2) \cdots (1 + a_n + a_n^2) \geq 3a_1 \cdot 3a_2 \cdots 3a_n = 3^n a_1 \cdot a_2 \cdots a_n = 3^n. $$
This is in fact the minimum value (and not just a lower bound) because equality does occur when $a_1 = a_2 = \dots = a_n = 1$.