$$f(1)=3 \quad f(2)=6\quad f(3)=18\quad f(4)=36 \quad f(5)=108$$
How can I define this function? The function is recursive and multiplies by 2 then 3 alternatively. I know I could solve this in code, but I'm not sure of the mathematical terms one could use to make a function like this. Let me know if I'm not clear and thank you for any help.
How about $f(n)=3^{\lceil n/2\rceil}\cdot 2^{\lfloor n/2\rfloor}$? Here $\lceil x\rceil$ denotes the smallest integer not less than $x$, and $\lfloor x\rfloor$ is the largest integer not greater than $x$.