After some messing around, I got this:
\(\displaystyle \sum_{k=0}^{\operatorname{floor}\left(\frac{n}{2}\right)+1}\operatorname{nCr}\left(n,\ 2k\right)\cdot2^{\left(n-2k\right)}\)
Basically, the floor(n/2)+1 calculates the number of possible twos given n. For example, if n is 3, the number of possible twos is floor(3/2)+1=2 (which is correct, since there could be either 0 or 2 twos)
The nCr(n, 2k) basically chooses the spots for the twos to be in.
Lastly, the 2^(n-2k) fills the rest of the remaining spots with either 3s or 1s.
It does not look very neat, but I don't really have the effort and determination to reduce it though lol