TITLE: An integral involving Airy functions $\int_0^\infty\frac{x^p}{\operatorname{Ai}^2 x + \operatorname{Bi}^2 x}\mathrm dx$
QUESTION [100 upvotes]: I need your help with this integral:
$$\mathcal{K}(p)=\int_0^\infty\frac{x^p}{\operatorname{Ai}^2 x + \operatorname{Bi}^2 x}\mathrm dx,$$
where $\operatorname{Ai}$, $\operatorname{Bi}$ are Airy functions:
$$\operatorname{Ai}\,x=\frac{1}{\pi}\int_0^\infty\cos\left(x\,z+\frac{z^3}{3}\right)\,\mathrm dz,$$
$$\operatorname{Bi}\,x=\frac{1}{\pi}\int_0^\infty\left(\sin\left(x\,z+\frac{z^3}{3}\right)+\exp\left(x\,z-\frac{z^3}{3}\right)\right)\,\mathrm dz.$$
I am not sure that $\mathcal{K}(p)$ has a general closed form, but I hope so, because approximate numerical calculations suggest these conjectured values:
$$\mathcal{K}(3)\stackrel?=\frac{5\,\pi^2}{32},\ \ \mathcal{K}(6)\stackrel?=\frac{565\,\pi^2}{512}.$$

REPLY [29 votes]: Here is an explicit formula based on O.L.'s answer:
$$\mathcal{K}(3n)=\frac{\pi^2}{6\cdot64^n}a_{2n},$$
where $a_n$ is the sequence defined recursively as follows:
$$a_0=1,\ \ a_{n+1}=(6\,n+4)\,a_n+\sum\limits_{i=0}^n a_i\,a_{n-i}$$