Let $a_n$ be the number of positive integers whose digits are all $1$, $3$, or $4$, and add up to $n$.

For example, $a_5 = 6$, since there are six integers with the desired property: $41, 14, 311, 131, 113$, and $11111$.

Prove that $a_n$ is a perfect square if $n$ is even.

I did some experimentation with small cases and found the recurrence relation $a_n=a_{n-1}+a_{n-3}+a_{n-4}$. How should I continue?

Also, I'd prefer a solution that does not use generating functions or the Taylor series.