Let
![A](/media/m/5/a/e/5ae81275ee67d638485e903bdc0e9cde.png)
and
![E](/media/m/8/b/0/8b01e755d2253cb9a52f9e451d89ec11.png)
be opposite vertices of an octagon. A frog starts at vertex
![A.](/media/m/a/f/4/af452ac1004b01499d6a6c2bacc5360f.png)
From any vertex except
![E](/media/m/8/b/0/8b01e755d2253cb9a52f9e451d89ec11.png)
it jumps to one of the two adjacent vertices. When it reaches
![E](/media/m/8/b/0/8b01e755d2253cb9a52f9e451d89ec11.png)
it stops. Let
![a_n](/media/m/1/f/f/1ff6f81c68b9c6fb726845c9ce762d7a.png)
be the number of distinct paths of exactly
![n](/media/m/a/e/5/ae594d7d1e46f4b979494cf8a815232b.png)
jumps ending at
![E](/media/m/8/b/0/8b01e755d2253cb9a52f9e451d89ec11.png)
. Prove that:
%V0
Let $A$ and $E$ be opposite vertices of an octagon. A frog starts at vertex $A.$ From any vertex except $E$ it jumps to one of the two adjacent vertices. When it reaches $E$ it stops. Let $a_n$ be the number of distinct paths of exactly $n$ jumps ending at $E$. Prove that: $$a_{2n-1}=0, \quad a_{2n}={(2+\sqrt2)^{n-1} - (2-\sqrt2)^{n-1} \over\sqrt2}.$$