Input resistance of small signal equivalent
Your final equation looks good, but you can simplify it further: 

$$R_{IN} = R \left( 1 + r_\pi\left(gm + \frac{1}{R}\right)\right)$$  

$$R_{IN} = R \left( 1 + r_\pi g_m + \frac{r_\pi}{R}\right)$$  

$$R_{IN} = R+ r_\pi g_m R + \frac{r_\pi}{R}R $$  

$$R_{IN} = R+ r_\pi g_m R + r_\pi $$  

And now knowing that  \$r_\pi \cdot g_m = \beta\$ because

\$ \beta= \frac{d(Ic)}{d(Ib)} \$ and \$ \textrm{d(Ib)} = \frac{d(v_{be})}{r_\pi}  \$

Therefore: 

\$ \frac{\beta}{r_\pi} = \frac{d(Ic)}{d(Vbe)}=g_m\$

So, we can write it like this:

$$R_{IN} = R+\beta R + r_\pi $$  

$$R_{IN} = (\beta + 1) R + r_\pi $$  

$$R_{IN} = r_\pi + (\beta + 1) R $$