TITLE: Divisibility property for sequence $a_{n+2}=-2(n-1)(n+3)a_n-(2n+3)a_{n+1}$
QUESTION [29 upvotes]: Let $(a_n)$ be the sequence uniquely defined by $a_1=0,a_2=1$ and 
$$
a_{n+2}=-2(n-1)(n+3)a_n-(2n+3)a_{n+1}
$$
Can anybody show (or provide a counterexample) that $p|a_{p-2}$ and 
$p|a_{p-1}$ for any prime $p\geq 5$ ? I have checked this fact for 
$p\leq 200$.

REPLY [6 votes]: Define $$a_1=0,\; a_2=1,\;\text{and}\quad a_{n+2}=-2(n-1)(n+3)a_n-(2n+3)a_{n+1}.\tag{0}$$
Define $$\;R(x) := \sqrt{1-4x} = 1-2\sum_{n=1}^\infty C_{n-1}x^n = \sum_{n=0}^\infty {2n \choose n}\frac{x^n}{1-2n}\;$$ which is the generating function of the OEIS integer sequence A002420.
Define $$\;B(x) := \frac{ (1+4x+8x^2)R(-x-2x^2)-(1+6x+18x^2+20x^3)}{2x^2}$$
$$ = 3x^2 - 6x^3 + 10x^4 - 12x^5 + 3x^6 + \dots
 =: \sum_{n=0}^\infty b_nx^n$$
which is the generating function for $b_n.\;$ It is easy to check that $b_n$ is also an integer sequence and $\;b_1=0, b_2=3.\;$ Using derivatives we get
the differential equation
$$\;(8x^2-2x-2)B(x)+12x^2=x(1+4x+8x^2)\frac{d}{dx}B(x)\;$$
and using some algebra on power series coefficients we get the equation
$$\;(2+n)b_{n}=(2-4n)b_{n-1}+(24-8n)b_{n-2}\quad\forall\;n>2.$$
Redefine $$\;a_n:=\frac{(n+2)!}{2^{n+1} 9}b_n.\tag{1}$$ 
It is easy to check that this satisfies the same initial values and recursion as given in $(0)$, but is it an integer sequence? It will be if
 $\;2^{n+1}\;|\;(n+2)!\;b_n\;$ for all $n>1.$
 The key results to prove is that if 
$\;C_n\;$ is the Catalan numbers and if $\;v_2(n)\;$ is the 2-adic valuation of $n$, then
$$v_2(b_n) = v_2(C_{n+1}) = v_2\Big(\frac{2^{n+1}}{(n+2)!}\Big),\; v_2(a_n)=0\quad \forall n>1. \tag{2}$$
Now the original equation $(0)$ already implies that $\;a_n\;$ is an integer sequence using induction, $\;a_n\;$ is odd if $n>1$, and the rest of equation $(2)$ is true.
However, there is an alternative approach using the exponential generating function of $\;a_n,\;$ namely $\;A(x):=\sum_{n=0}^\infty a_nx^n/n!.\;$
Using equation $(0)$ for $\;a_n\;$ we get the differential equation
$$ 1 = -6A(x) +(3+6x)\frac{d}{dx}A(x) + (1+2x+2x^2)\frac{d^2}{dx^2}A(x).$$
Taking the derivative of this equation gives another differential equation
$$ 0 = 5(1+2x)\frac{d^2}{dx^2}A(x) +(1+2x+2x^2)\frac{d^3}{dx^3}A(x).$$
Now define the sequence $\;y_n(x)\;$ by
$\,y_0(x) := 1+O(x),\,$ and recursion
$$ y_{n+1}(x) := 1-\int_0^x 5(1+2x)/(1+2x+2x^2)\;y_n(x)\; dx. \tag{3}$$
The limit as $\;n\to\infty$ of $\;y_n(x) =\frac{d^2}{dx^2}A(x).\;$ It is easy to check that the recursion $(3)$ preserves exponential generating functions of integer sequences. Thus, again $\;a_n\;$ is an integer sequence.
If $n>0$ is odd, then $(n+2)\;|\;a_n$ and if $n>2$ is even, then $(n+1)\;|\;a_n.\;$ This since one of the $(n\!+\!1)(n\!+\!2)$ factors in the numerator of  $(1)$ are not cancelled by the $2^{n+1}$ in the denominator.