Goosenish is a language well-known in the animal kingdom for its refined phonetics. Its alphabet consists of three letters: h (standing for a noisy honk); c (standing for an uncontrolled cackle); and a (standing for an angry-hiss). Goosenish is a wide language, and every string that uses at least one character in {h,c,a} is a word in Goosenish. Geese have a special fascination for words full of symmetries, such as palindromes.
A palindrome is a word that reads the same backwards as forwards. Examples of palindromes in Goosenish are cachhcac, c, and hhh; words such as hcca are not palindromes.
Let $S$ be the set of Goosenish palindromes, and for every such palindrome $p$, let $w(p)$ be the length of $p$. For example: $w(\text{cachhcac}) = 8$. Consider $\Phi_{S}(x)=\sum_{n \geq 0} a_{n} x^{n}$ the generating series of $S$ with respect to $w$.
I am trying to prove part a):
$a_{n}=3 \cdot a_{n-2}, \text { for } n \geq 3$
using a recursive relationship, but I am unsure of how to structure the proof.
To show that $a_n=3a_{n-2}$, note that if you have a palendrome of size $n$ and snip off the first and last letters, you are left with a palendrome of size $n-2$. This gives you a map from $n$ to $n-2$. To go from $n-2$ to $n$, convince yourself that it suffices to choose one of the 3 letters to then append to the beginning and end of the $n-2$ length palendrome. Show then that all length $n$ palendromes can be formed by this procedure when you start with all $n-2$ length palendromes, i.e. each palendrome of length $n$ uniquely corresponds to a palendrome of length $n-2$.
Part $b$ is then trivial induction.