Recurrence relation of $1, 3, 3, 15, 5, 35, 7, 63, 9, 99, 11, 143, 13$

163 Views Asked by At

I found this sequence: $$1,3,3,15,5,35,7,63,9,99,11,143,13,\ldots$$

I'm looking for its recurrence relation, and/or its closed form.


My take: It's easy to see that when $n\geq4$ and is even, $a_n=a_{n-1}\cdot a_{n+1}$, and when $n\geq3$ and odd, then $a_n=n$. I'm having trouble to "combine" these observations into one recurrence relation.

Add: was able to write the recurrence relation as: $$b_n=n^2-1+(-1)^n(b_{n-1}+(-1)^{n-1}(n-1)).$$ For $b_1=1$, though the resulting closed form doesn't look elementary. The generating function, using a CAS, is: $$\frac{x^5+x^4-6 x^3-3 x-1}{\left(x^2-1\right)^3}.$$