1 Introduction

The properties of exact solutions of Schrödinger equation for the hydrogen atom and harmonic oscillator were of fundamental importance for the formulation of theoretical models of atoms, molecules and solids. The search for other exactly solvable potentials resulted in the development of several very general methods including the factorization method of Hull and Infeld [1], the supersymmetric formulation of quantum mechanics [2], and closely linked to it concept of the shape-invariant potentials [3]. In general, the exact wavefunctions corresponding to these solutions were expressed in terms of some orthogonal polynomials multiplied by factors deduced from the form of the potential and from the asymptotic behavior of the underlying differential equation at various limits (0 and \(\infty\) in the case of spherical systems). It was also shown (see, e.g., [2]) that for all known shape-invariant potentials and, consequently, for most of exactly solvable equations, the orthogonal polynomials are special cases of either confluent hypergeometric function \({}_1F_1(a;c;x)\) [4] or hypergeometric function \({}_2F_1(a,b;c;x)\) [5, 6].

Endeavors to analytical solving quantum-mechanical three-body problem have been taken since the earliest years of quantum theory [79] and continue until now [1016]. Bethe and Salpeter in their “Quantum Mechanics of One- and Two-electron Atoms” state that The differential equation for the two-electron system is not separable. Unlike the solutions for the hydrogen atom, the solutions for the eigenfunctions and energy eigenvalues cannot be expressed in closed analytic form [17]. This opinion seems to be not a statement of a rigorous mathematical fact but rather an expression of frustrations associated with numerous futile attempts to achieve this task. Though in many aspects the analytical theory of the helium atom reached significant success, it is commonly recognized as a rather unrealistic direction of development. Only a marginal minority of quantum chemists, including the present authors, believes that the analytical approach is promising and may lead to a robust and accurate quantum chemical calculation protocol for many-electron atoms and molecules.

In parallel to the central problem of the helium atom—a system of three quantum particles interacting via Coulomb forces—a search for exactly solvable three-particle problems led to several very interesting discoveries. Probably the most important finding was the so-called Hooke atom also referred to as harmonium. It was recognized in 1962 by Kestner and Sinanoğlu that the Schrödinger equation describing two electrons interacting by the Coulomb forces and confined in a central harmonic (i.e., quadratic or parabolic) potential is separable [18]. The problem was shown quasi-solvable analytically six years later by Santos [19]. In quasi-exactly solvable systems, a single solution expressible in terms of a polynomial multiplied by asymptotic factors may be obtained only for some specific values of constants defining the potential. The results of Santos remained unnoticed for several decades, and the same system was rediscovered a quarter of a century later by Taut [20], becoming a subject of numerous studies (see, e.g., [1924]). Some related systems, with modified potentials, e.g., containing an additional linear term, were also investigated and applied to the description of a variety of phenomena [2528].

Independently of the developments motivated by problems in quantum mechanics, mathematical studies of second-order linear ordinary differential equations resulted [29, 30] in formulations going far beyond the classical equations belonging to the hypergeometric class [46]. To the most interesting and hardly known in quantum chemistry equations belongs the class of the Heun equations [31] known and studied since 125 years. A relatively recent collection of works on this subject appeared in the proceedings of the Centennial Workshop on Heun’s Equation [32]. Important monographs on this and related subjects have been published by Slavyanov and Lay [29] and by Ronveaux [30]. Among equations of the Heun class, the most relevant in the context of harmonium is the biconfluent Heun equation (BHE). It describes harmonium and its more general form with an additional linear term. A discussion of the relations between the BHE and the Schrödinger equation for harmonium is the main subject of this paper.

Hereafter, we use the following notation conventions: A sans serif symbol (e.g., \({{\mathsf {n}}}, {{\mathsf {l}}}, {{\mathsf {k}}}\)) always corresponds to a quantum number while the standard one \(j,k,l,m,n\) to an integer index; \(\mathbb {T}\) stands for a vector with elements \(t_j\);

$$\begin{aligned} (s)_m=s(s+1)(s+2)\cdots (s+m-1) \end{aligned}$$
(1)

is the Pochhammer symbol;

$$\begin{aligned} (s)_{m,a}=s(s+a)(s+2a)\cdots \left( s+(m-1)a\right) \end{aligned}$$
(2)

is the Pochhammer \(a\)-symbol (usually referred to in the literature [33] as the Pochhammer \(k\)-symbol); \(\lfloor {a}\rfloor\) is the floor function, i.e., the largest integer less than or equal to \(a\).

2 Harmonium

Harmonium may be defined as a quantum three-body problem described by the Schrödinger equation with harmonic interactions between particles \(1-3\) and \(2-3\) and the Coulombic interaction between particles \(1-2\). The problem is separable to three 3D equations also if the \(1-2\) interaction is described by an arbitrary potential \(\mathsf V(r_{12})\) which depends on the distance between the two particles only [28]. The first equation corresponds to the free motion of the center of mass. The second one describes the oscillations of particle \(3\) and the center of mass of particles \(1\) and \(2\) (the spherical harmonic oscillator equation). The third equation reads

$$\begin{aligned} \mathsf h(\mathbf {r})\Phi _{{{\mathsf {n}}}{{\mathsf {l}}}\mathsf {m}_{{\mathsf {l}}}} (\mathbf {r})=E_{{{\mathsf {n}}}{{\mathsf {l}}}} \Phi _{{{\mathsf {n}}}{{\mathsf {l}}}\mathsf {m}_{{\mathsf {l}}}}(\mathbf {r}) \end{aligned}$$
(3)

where \(\mathbf {r}=\mathbf {r}_1-\mathbf {r}_2\),

$$\begin{aligned} \mathsf h(\mathbf {r})=\frac{\mathsf p(\mathbf {r})^2}{2\mu }+\mathsf V(r)+ \frac{\mu \,\omega ^2}{2}\,r^2, \end{aligned}$$
(4)

\(r=r_{12}=|{\mathbf {r}}_1-{\mathbf {r}}_2|, \mu\) is the reduced mass of particles \(1\) and \(2\) and \(\omega\) is a constant which depends on the parameters characterizing the harmonic interactions between the particles (see, e.g., [28] for details). Eq. (3) is spherically symmetric, and its solutions can be written as

$$\begin{aligned} \Phi _{{{\mathsf {n}}}{{\mathsf {l}}}{\mathsf {m}}_{{\mathsf {l}}}}({\mathbf {r}})= \frac{\phi _{{{\mathsf {n}}}{{{\mathsf {l}}}}}(r)}{r} Y_{{{\mathsf {l}}}{\mathsf {m}}_{{\mathsf {l}}}} ({\hat{\mathbf {r}}}), \end{aligned}$$
(5)

where \(\phi _{{{\mathsf {n}}}{\mathsf{l}}} (r)\) is the radial part of the wavefunction and \(Y_{{{\mathsf {l}}}\mathsf {m}_{{\mathsf {l}}}}\) denote the usual spherical harmonics in \(3D\).

Assuming

$$\begin{aligned} \mathsf V(r)=\frac{\zeta }{r}+b\,r+c, \end{aligned}$$
(6)

where \(\zeta , b\) and \(c\) are constants, and setting \(b=-r_{{\mathrm {e}}}\mu \,\omega ^2, c=r_{\mathrm {e}}^2\mu \,\omega ^2/2\), where \(r_{\mathrm {e}}\) is a new constant introduced to allow for an easy physical interpretation of the potential, we may write the radial Schrödinger equation as

$$\begin{aligned} \left[ -\frac{1}{2\mu }\frac{\hbox {d}^2}{\hbox {d}r^2}+\frac{{{\mathsf {l}}}({{\mathsf {l}}}+1)}{2\mu r^2}+\frac{\zeta }{r}+\frac{\mu \,\omega ^2}{2}\left( r-r_{\mathrm {e}}\right) ^2 -E_{{{\mathsf {n}}}{{\mathsf {l}}}}\right] \phi _{{{\mathsf {n}}}{{\mathsf {l}}}}(r)=0. \end{aligned}$$
(7)

Here, we see this equation as a result of exact separation of a \(3\)-particle Schrödinger equation. Alternatively it can be derived for a system of two particles interacting by the Coulomb force and confined in a parabolic external potential.

If \(r_{\mathrm {e}}=0\), then the last equation describes harmonium [19, 20, 24]. For \(r_{\mathrm {e}}\ne 0\), it corresponds to a harmonium-like system in which the minimum of the parabolic potential is shifted from \(r=0\) to \(r=r_{\mathrm {e}}\). This system, discussed in detail by Ghosh and Samanta [26, 27], is referred to as shifted harmonium. If \(\omega =0\) and \(\zeta <0\), the equation describes two interacting particles with opposite electric charges (e.g., positronium or hydrogen atom) [24]. For \(\omega =0\) and \(\zeta >0\), it describes scattering of two particles with the same sign of the charge. Finally, if \(\zeta =0\), we have a spherical harmonic oscillator. For \(\omega >0\), independently of the values of the remaining parameters, all energies derived from Eq. (7) are discrete. On the other hand, if \(\omega =0\) and \(\zeta >0\), then there are no discrete energy levels.

After the substitutions

$$\begin{aligned} {\mathfrak {r}}=\sqrt{2\mu \,\omega }\,r,\;\;\;\;\;{\mathfrak {r}}_{\mathrm {e}}= \sqrt{2\mu \,\omega }\,r_{\mathrm {e}}, \end{aligned}$$
(8)

Eq. (7) transforms to

$$\begin{aligned} \left[ -\frac{\hbox {d}^2}{\hbox {d}{\mathfrak {r}}^2}+\frac{{{\mathsf {k}}}({{\mathsf {k}}}-2)}{4{\mathfrak {r}}^2}+\sqrt{\frac{2\mu }{\omega }} \frac{\zeta }{{\mathfrak {r}}}+\frac{\left( {\mathfrak {r}}-{\mathfrak {r}}_{\mathrm {e}} \right) ^2}{4}-\frac{E_{{{\mathsf {n}}}{{\mathsf {l}}}}}{\omega }\right] \phi _{{{\mathsf {n}}}{{\mathsf {l}}}}({\mathfrak {r}})=0. \end{aligned}$$
(9)

where

$$\begin{aligned} {{\mathsf {k}}}=2{{\mathsf {l}}}+2 \end{aligned}$$
(10)

is a quantum number used hereafter in parallel with \({{\mathsf {l}}}={{\mathsf {k}}}/2-1\) in order to simplify the notation [34]. Square-integrable solutions of Eq. (9) may be expressed as

$$\begin{aligned} \phi _{{{\mathsf {n}}}{{\mathsf {l}}}}({{\mathfrak {r}}})\sim {\mathfrak {r}}^{\,{{\mathsf {k}}}/2} \,{\mathrm {e}}^{-({\mathfrak {r}}-{\mathfrak {r}}_{\mathrm {e}})^2/4}\, P_{{\mathsf {n}}}^{\,{{\mathsf {k}}}}({\mathfrak {r}}). \end{aligned}$$
(11)

The functions \(P_{{\mathsf {n}}}^{\,{{\mathsf {k}}}}({\mathfrak {r}})\) are square integrable and orthonormal with respect to the weight function (measure)

$$\begin{aligned} w({{\mathfrak {r}}})={\mathfrak {r}}^{{\mathsf {k}}} {\mathrm {e}}^{-({\mathfrak {r}}-{\mathfrak {r}}_{\mathrm {e}})^2/2}. \end{aligned}$$
(12)

This means that

$$\begin{aligned} \int \limits _0^\infty {}P_{{\mathsf {n}}}^{\,{{\mathsf {k}}}}({\mathfrak {r}})\, P_{{{\mathsf {n}}}^\prime }^{\,{{\mathsf {k}}}}({\mathfrak {r}})\,w({\mathfrak {r}}) \,d{\mathfrak {r}}=C\,\delta _{{{\mathsf {n}}},{{\mathsf {n}}}^\prime }, \end{aligned}$$
(13)

where \(C\) is a positive constant. Since \(\phi _{{{\mathsf {n}}}{{\mathsf {l}}}}({\mathfrak {r}})\sim {\mathfrak {r}}^{\,{{\mathsf {k}}}/2}\) for \({\mathfrak {r}}\rightarrow {0}, P_{{\mathsf {n}}}^{\,{{\mathsf {k}}}}(0)\) is finite. Therefore, without any loss of generality, we set \(P_{{\mathsf {n}}}^{\,{{\mathsf {k}}}}(0)=1\) as the normalization condition.

The equation for \(P_{{\mathsf {n}}}^{\,{{\mathsf {k}}}}\) directly results from Eqs. (9) and (11) and reads

$$\begin{aligned} \left[ \frac{\hbox {d}^2}{\hbox {d}{\mathfrak {r}}^2}+ \left( \frac{{{\mathsf {k}}}}{{\mathfrak {r}}}+{\mathfrak {r}}_{\mathrm {e}}- {\mathfrak {r}}\right) \frac{d}{d{\mathfrak {r}}}+\left( {\mathcal {E}}_{{\mathsf {n}}}^{\,{{\mathsf {k}}}} +\frac{{{\mathsf {k}}}{\mathfrak {r}}_{\mathrm {e}}-2s}{2{\mathfrak {r}}}\right) \right] P_{{\mathsf {n}}}^{\,{{\mathsf {k}}}}=0, \end{aligned}$$
(14)

where

$$\begin{aligned} s=\sqrt{\frac{2\mu }{\omega }}\,\zeta \end{aligned}$$
(15)

and the eigenvalue \({\mathcal {E}}_{{\mathsf {n}}}^{\,{{\mathsf {k}}}}({\mathfrak {r}}_{\mathrm {e}},s)\) is related to the energy of the system as

$$\begin{aligned} E_{{{\mathsf {n}}}{{\mathsf {l}}}}= \omega \left( {\mathcal {E}}_{{\mathsf {n}}}^{\,{{\mathsf {k}}}} +{{\mathsf {l}}}+\frac{3}{2}\right) . \end{aligned}$$
(16)

The eigenfunctions

$$\begin{aligned} P_{{\mathsf {n}}}^{\,{{\mathsf {k}}}}({\mathfrak {r}})=P_{{\mathsf {n}}}^{\,{{\mathsf {k}}}} \left( {\mathfrak {r}}_{\mathrm {e}},s, {\mathcal {E}}_{{\mathsf {n}}}^{\,{{\mathsf {k}}}}({\mathfrak {r}}_{\mathrm {e}},s) ;{\mathfrak {r}}\right) \end{aligned}$$
(17)

are square integrable in the sense of Eq. (13). The quantum number \({{\mathsf {n}}}=0,1,2,\ldots\) labels all consecutive eigenvalues and eigenfunctions corresponding to fixed \({{\mathsf {k}}}, {\mathfrak {r}}_{\mathrm {e}}\) and \(s\).

Equation (14) has been extensively studied by two independent communities. On one hand, the existence of simple polynomial solutions of this equation, discovered in connection with studies on electron correlation, motivated numerous works in the community of quantum chemists [1828]. However, this equation is known in mathematics since more than a century as the biconfluent Heun equation and its properties were studied from both purely mathematical perspective [29, 30, 3538] and in the context of its applications in different areas of physics [3941]. Very recently a brief review on its physical applications has been published by Hortaçsu [42]. An analysis of its application to modeling the behavior of two interacting electrons in a uniform magnetic field and a parabolic confinement was published several years ago by Kandemir [34].

3 The traditional approach

In the traditional approach, motivated by the studies on electron correlation problems, one looks for the polynomial solutions of Eq. (14). To this aim, one expresses a solution of Eq. (14) as a power series of \({\mathfrak {r}}\) [19, 20]

$$\begin{aligned} P^{\,{{\mathsf {k}}}}_{{{\mathsf {n}}}}\left( {\mathfrak {r}}_{\mathrm {e}},s,{\mathcal {E}}; {\mathfrak {r}}\right) =\sum \limits _{m=0}^\infty a_m^{{\mathsf {k}}} \left( {\mathfrak {r}}_{\mathrm {e}},s,{\mathcal {E}}\right) \,{\mathfrak {r}}^m, \end{aligned}$$
(18)

and then formulates conditions under which the expansion terminates, i.e., \(P^{\,{{\mathsf {k}}}}_{{\mathsf {n}}}\) is a polynomial. The normalization \(P^{\,{{\mathsf {k}}}}_{{\mathsf {n}}}(0)=1\) implies \(a_0^{{{\mathsf {k}}}}=1\).

The substitution of the expansion (18) to Eq. (14) leads to the following three-term recurrence relation

$$\begin{aligned} B_0a^{{\mathsf {k}}}_0+C_1a^{{\mathsf {k}}}_1&= 0,\nonumber \\ A_ma^{{\mathsf {k}}}_m+B_{m+1}a^{{\mathsf {k}}}_{m+1}+C_{m+2}a^{{\mathsf {k}}}_{m+2}&= 0,\nonumber \\&\quad m=0,1,2,\ldots \end{aligned}$$
(19)

with

$$\begin{aligned} A_m={{\mathcal {E}}}-m,\;\; B_m=(m+{{\mathsf {k}}}/2)\,{\mathfrak {r}}_{\mathrm {e}}-s,\;\; C_m=m(m+{{\mathsf {k}}}-1). \end{aligned}$$
(20)

The recurrence relation (19) generates a \(p\)-th order polynomial if it terminates at \(a^{{\mathsf {k}}}_p\), i.e., if \(a^{{\mathsf {k}}}_p\ne 0\) but \(a^{{\mathsf {k}}}_{p+1}=a^{{\mathsf {k}}}_{p+2}=\cdots =0\). This condition may by satisfied if \(A_p=0\) (i.e. \({\mathcal {E}}=p\)) and \(a^{{\mathsf {k}}}_m, m=0,1,\ldots ,p\) fulfill the set of homogeneous equations (19) for \(m=0,1,2,\ldots ,p\). This implies that [Eq. (16)]

$$\begin{aligned} E_{p{{\mathsf {l}}}}=\omega \left( p+{{\mathsf {l}}}+\frac{3}{2}\right) \end{aligned}$$
(21)

and

$$\begin{aligned} W_{p+1}(\mathbb {A}^{p},\mathbb {B},\mathbb {C})=\left| \begin{array}{ccccccc} B_0&{}C_1&{}0&{}\cdots &{}0&{}0&{}0\\ A_0^{p}&{}B_1&{}C_2&{}\cdots &{}0&{}0&{}0\\ 0&{}A_1^{p}&{}B_2&{}\cdots &{}0&{}0&{}0\\ \vdots &{}\vdots &{}\ddots &{}\ddots &{} &{}\vdots &{}\vdots \\ \vdots &{}\vdots &{}\ &{}\ddots &{}\ddots &{}\vdots &{}\vdots \\ 0&{}0&{}0&{}\cdots &{}A_{p-2}^{p}&{}B_{p-1}&{}C_p\\ 0&{}0&{}0&{}\cdots &{}0&{}A_{p-1}^{p}&{}B_p \end{array} \right| =0, \end{aligned}$$
(22)

where \(\mathbb {A}^{p}=\{A_0^{p},A_1^{p},\ldots ,A_{p-1}^{p}\}, \mathbb {B}=\{B_0,B_1,\ldots ,B_p\}, \mathbb {C}=\{C_1,C_2,\ldots ,C_p\}, A_m^{p}=p-m\).

The determinant depends on \(s, {\mathfrak {r}}_{\mathrm {e}}\) and \({{\mathsf {k}}}\). Since \({{\mathsf {k}}}\) is fixed by the selection of a specific angular momentum, Eq. (22) imposes a relation \(s^p_j=\varphi ^p_j({\mathfrak {r}}_{\mathrm {e}}), j=1,2,\ldots ,p+1\), between \(s\) and \({\mathfrak {r}}_{\mathrm {e}}\). Thus, for a given degree \(p\) of the polynomial and for given \({\mathfrak {r}}_{\mathrm {e}}\), we have a discrete set of \(p+1\) values of \(s\) for which the polynomial solutions exist. The wavefunctions derived from this procedure are probably the only ones known in the literature in which the \(r_{12}\) dependence resulting from the Coulomb interaction between electrons may be expressed exactly in a closed form [43].

Let us note that for given \(\{s,\,{\mathfrak {r}}_{\mathrm {e}},\,{{\mathsf {k}}}\}\), there exists a complete orthonormal set of solutions of Eq. (14). If there exists \(p\) for which the parameters fulfill Eq. (22), then for one of these solutions \({\mathcal {E}}=p\) and this solution is a polynomial of degree \(p\).

4 Biconfluent Heun equation

In the mathematical literature, the BHE in its canonical form is usually expressed as [30, 35, 36]

$$\begin{aligned} x\,y^{\prime \prime }+\left( 1+\alpha -\beta \,x-2x^2\right) y^\prime + \left( \left( \gamma -\alpha -2\right) \,x-\frac{1}{2}\left[ \delta + \beta (1+\alpha )\right] \right) \,y=0. \end{aligned}$$
(23)

It is a homogeneous, linear, second-order, differential equation defined in the complex plane. In the two-dimensional space of its particular solutions, one can choose a solution which is finite at \(x=0\). Then the second linearly independent solution behaves at \(x=0\) as \(x^{-\alpha }\). The solution finite at \(x=0\) is usually denoted \(N(\alpha ,\beta ,\gamma ,\delta ;x)\) and referred to as the biconfluent Heun function. It is usually expressed as [30]

$$\begin{aligned} N(\alpha ,\beta ,\gamma ,\delta ;x)=\sum \limits _{m=0}^\infty \frac{{\mathcal {A}}_m(\alpha ,\beta ,\gamma ,\delta )}{(1+\alpha )_m}\frac{x^m}{m!}, \end{aligned}$$
(24)

where

$$\begin{aligned} {\mathcal {A}}_0&= 1,\nonumber \\ {\mathcal {A}}_1&= \frac{1}{2}\left( \delta +\beta (1+\alpha )\right) ,\\ {\mathcal {A}}_{m+2}&= \left( (m+1)\beta +\frac{1}{2}\left[ \delta + \beta (1+\alpha )\right] \right) {\mathcal {A}}_{m+1}\nonumber \\&\quad -(m+1)(m+1+\alpha )(\gamma -2-\alpha -2m){\mathcal {A}}_m.\nonumber \end{aligned}$$
(25)

The substitutions

$$\begin{aligned} x&= {\mathfrak {r}}/\sqrt{2}\in \langle 0,\infty \rangle ,\nonumber \\ \alpha&= {{\mathsf {k}}}-1>0,\nonumber \\ \beta&= -\sqrt{2}\,{\mathfrak {r}}_{\mathrm {e}},\\ \gamma&= 2\,{\mathcal {E}}+{{\mathsf {k}}}+1,\nonumber \\ \delta&= 2\sqrt{2}s,\nonumber \end{aligned}$$
(26)

with all parameters real and \(s\ge {0}, {\mathfrak {r}}_{\mathrm {e}}\ge {0}, {\mathcal {E}}\ge {0}\), restrict the domain of the equation to the real semiaxis and transform Eq. (23) to Eq. (14). In the real semiaxis, we can set

$$\begin{aligned} N(\alpha ,\beta ,\gamma ,\delta ;x)=P\left( {{\mathsf {k}}}, {\mathfrak {r}}_{\mathrm {e}},s,{\mathcal {E}};{\mathfrak {r}}\right) \end{aligned}$$
(27)

where \(P\left( {{\mathsf {k}}},{\mathfrak {r}}_{\mathrm {e}},s,{\mathcal {E}}; {\mathfrak {r}}\right)\) is a formal solutions of Eq. (14) which may be expressed as in Eqs. (18) and (24). By construction, the normalization \(P\left( {{\mathsf {k}}},{\mathfrak {r}}_{\mathrm {e}},s,{\mathcal {E}}; 0\right) =1\) is retained. However, \({\mathcal {E}}\) is an independent parameter, and no boundary conditions have been imposed for \({\mathfrak {r}}\rightarrow \infty\). Using the mapping between \(\{\alpha ,\beta ,\gamma ,\delta \}\) and \(\{{{\mathsf {k}}},{\mathfrak {r}}_{\mathrm {e}},s,{\mathcal {E}}\}\) defined by Eqs. (26), one can easily show the equivalence of the recurrence relations (25) and (19). In particular, comparing Eqs. (19), (24) and (26), we get

$$\begin{aligned} a^{{\mathsf {k}}}_m\left( {\mathfrak {r}}_{\mathrm {e}},s,{\mathcal {E}}\right) = \frac{{\mathcal {A}}_m\left[ {{\mathsf {k}}}-1,-\sqrt{2}\,{\mathfrak {r}}_{\mathrm {e}}, 2\,{\mathcal {E}}+{{\mathsf {k}}}+1,2\sqrt{2}s\right] }{2^{m/2}\,m!\, ({{\mathsf {k}}})_m}. \end{aligned}$$
(28)

The asymptotic behavior of \(N(\alpha ,\beta ,\gamma ,\delta ;x)\) for \(x\rightarrow \infty\) is given by [35, 36]

$$\begin{aligned} N(\alpha ,\beta ,\gamma ,\delta ;x)\sim \,K(\alpha ,\beta ,\gamma ,\delta ) \,x^{-(\gamma +2+\alpha )/2}{\mathrm {e}}^{\beta \,x+x^2}, \end{aligned}$$
(29)

where \(K(\alpha ,\beta ,\gamma ,\delta )\) is a constant. Using (26) and (27), we can rewrite Eq. (29) in the limit \({\mathfrak {r}}\rightarrow \infty\) as

$$\begin{aligned} P\left( {{\mathsf {k}}},{\mathfrak {r}}_{\mathrm {e}},s,{\mathcal {E}}; {\mathfrak {r}}\right) \sim {{\mathcal {K}}}\left( {{\mathsf {k}}},{\mathfrak {r}}_{\mathrm {e}},s,{\mathcal {E}}\right) {\mathfrak {r}}^{-({\mathcal {E}}+{{\mathsf {k}}}+1)}{\mathrm {e}}^{({\mathfrak {r}}- {\mathfrak {r}}_{\mathrm {e}})^2/2}. \end{aligned}$$
(30)

By an inspection of Eqs. (12) and (13), we can see that \(P\left( {{{\mathsf {k}}}},{\mathfrak {r}}_{\mathrm {e}},s,{\mathcal {E}}; {\mathfrak {r}}\right)\) is not square integrable, unless

$$\begin{aligned} {\mathcal {K}}\left( {{{\mathsf {k}}}},{\mathfrak {r}}_{\mathrm {e}},s,{\mathcal {E}}\right) =0. \end{aligned}$$
(31)

The last equation plays the role of the quantization condition which determines the eigenvalues. If \({\mathcal {E}}={\mathcal {E}}_{{{\mathsf {n}}}}^{\,{{\mathsf {k}}}} ({\mathfrak {r}}_{\mathrm {e}},s)\) is a root of Eq. (31), then

$$\begin{aligned} E_{{{\mathsf {n}}}{{\mathsf {l}}}}=\omega \left( {\mathcal {E}}_{{\mathsf {n}}}^{\,{{\mathsf {k}}}} ({\mathfrak {r}}_{\mathrm {e}},s)+{{\mathsf {l}}}+\frac{3}{2}\right) \end{aligned}$$
(32)

and

$$\begin{aligned} P\left( {{\mathsf {k}}},{\mathfrak {r}}_{\mathrm {e}},s,{\mathcal {E}}_{{\mathsf {n}}}^ {\,{{\mathsf {k}}}}({\mathfrak {r}}_{\mathrm {e}},s);{\mathfrak {r}}\right) = P_{{\mathsf {n}}}^{\,{{\mathsf {k}}}}({\mathfrak {r}}); \end{aligned}$$
(33)

are the square-integrable solutions of Eq. (14).

The structure of expansion (18) for two electrons in a uniform magnetic field was studied by Kandemir [34]. In particular, he reduced the recurrence relation to a closed-form expression. Here, we present a more general analysis. In this derivation, a graphical approach, based on the ideas originally developed by Isaiah Shavitt in his graphical unitary group approach (GUGA) [44, 45], proved to be very useful.

4.1 Expansion coefficients

The recurrence relation (19) may be rewritten as

$$\begin{aligned} a^{{\mathsf {k}}}_m=p_{m-1}\,a^{{\mathsf {k}}}_{m-1}+t_{m-2}\,a^{{\mathsf {k}}}_{m-2}, \end{aligned}$$
(34)

where

$$\begin{aligned} p_m=-\frac{B_m}{C_{m+1}},\;\;\;t_m=-\frac{A_m}{C_{m+2}}. \end{aligned}$$
(35)

Equation (34) may be represented by a diagram which facilitates an easy derivation of a closed-form formula for the coefficients of the expansion (18). It also helps to better understand the structure of this expansion and shows interrelations between specific coefficients. The diagram, corresponding to \(m=6\), is presented in Fig. 1. In order to express a specific coefficient, say \(a^{{\mathsf {k}}}_m\), in terms of \(p_j, j=0,1,\ldots ,m-1\) and \(t_j, j=0,1,\ldots ,m-2\), one has to start from the uppermost node corresponding to \(a^{{\mathsf {k}}}_0\) and move to the lower levels of the graph along arcs taking all paths connecting to the node \(a^{{\mathsf {k}}}_m\), visiting each level only once. The contribution from a given path is equal to the product of quantities assigned to the arcs. In the right panel of Fig. 1, these contributions are framed by the square boxes. The value of \(a^{{\mathsf {k}}}_m\) is equal to the sum of contributions from all paths. The left panel shows the directions according to which we move along the diagram and, in the nodes, gives the numbers of paths linking this specific node with the one corresponding to \(a^{{\mathsf {k}}}_0\) (i.e., the number of terms in the expression for a given coefficient \(a^{{\mathsf {k}}}_m\)). The structure of the graph is self-explanatory, and its extension to larger values of \(m\) is obvious.Footnote 1

Fig. 1
figure 1

Graphical representation of three-step recurrence relations exemplified by Eq. (19). In the left panel, the ways of constructing paths in the graph and the number of terms in each \(a^{{\mathsf {k}}}_m, m=0,1,\ldots ,6\) are shown. In the right panel, the arc values are given. See text for details

Using the graph, one can easily write explicit expression for the coefficients \(a^{{\mathsf {k}}}_m\), with \(a^{{\mathsf {k}}}_0=1\) set by the normalization condition. Then, we have

$$\begin{aligned} a^{{\mathsf {k}}}_1&= p_0,\nonumber \\ a^{{\mathsf {k}}}_2&= p_1p_0+t_0,\nonumber \\ a^{{\mathsf {k}}}_3&= p_2p_1p_0+p_2t_0+p_0t_1,\nonumber \\ a^{{\mathsf {k}}}_4&= p_3p_2p_1p_0+p_3p_2t_0+p_3p_0t_1+p_1p_0t_2+t_2t_0, \;\;\text{ etc}. \end{aligned}$$
(36)

By introducing

$$\begin{aligned} Q_m=\prod \limits _{j=0}^{m-1}p_j,\;\;\;\;\;R_j=\frac{t_j}{p_{j}p_{j+1}}, \;\;\;\;\;j=0,1,2,\ldots ,m-2. \end{aligned},$$
(37)

we can rewrite Eqs. (36) as

$$\begin{aligned} a^{{\mathsf {k}}}_m\left( {\mathfrak {r}}_{\mathrm {e}},s,{\mathcal {E}}\right) = Q_m\sum \limits _{n=0}^{\lfloor {m/2}\rfloor }S_n^m, \end{aligned}$$
(38)

where

$$\begin{aligned} S_0^m&= 1,\\ S_n^m&= \sum \limits _{j_1=0}^{m-2n}R_{j_1}\sum \limits _{j_2=j_1}^{m-2n}R_{j_2+2}\cdots \sum \limits _{j_n=j_{n-1}}^{m-2n}R_{j_n+2(n-1)},\;n\le \lfloor {m/2}\rfloor \nonumber \end{aligned}$$
(39)

The last equations may be expressed in a compact form as

$$\begin{aligned} {S_0^m}&= {1},\\ {S_n^m}&= \prod \limits _{l=1}^n\;\;\sum \limits _{j_l=j_{l-1}}^{m-2n}R_{j_l+2(l-1)},\;\; j_0=0,\;\;n\le \lfloor {m/2}\rfloor .\nonumber \end{aligned}$$
(40)

Let us note that the product represents \(n\) nested sums and is non-commutative.

By the substitution of the explicit expressions (35), (37) and (20), we get

$$\begin{aligned} Q_m=(-1)^m\prod \limits _{j=0}^{m-1}\frac{B_j}{C_{j+1}}=\frac{({{\mathsf {k}}}{\mathfrak {r}}_{\mathrm {e}}/2-s)_{m,{\mathfrak {r}}_{\mathrm {e}}}}{m!\,({{\mathsf {k}}})_m}. \end{aligned}$$
(41)

Similarly,

$$\begin{aligned} R_j=-\frac{A_j\,C_{j+1}}{B_j\,B_{j+1}}=-\frac{({\mathcal {E}}-j)(j+1) (j+{{\mathsf {k}}})}{\left( s-(j+{{\mathsf {k}}}/2)\,{\mathfrak {r}}_{\mathrm {e}}\right) \left( s-(j+{{\mathsf {k}}}/2+1)\,{\mathfrak {r}}_{\mathrm {e}}\right) } \end{aligned}$$
(42)

Note that Eqs. (34)–(40) are valid for an arbitrary three-term recurrence relation, i.e., for all forms of the Heun equation.

Three term recurrences are fulfilled by many quantities related to BHE. In particular, \(S_m\) fulfill the following recurrence:

$$\begin{aligned} S^m_0=1,\;\;\;S^m_n=S^{m-2}_{n-1}R_{m-2}+S^{m-1}_n. \end{aligned}$$
(43)

Iterating this relation, we arrive at

$$\begin{aligned} S^m_n=\sum \limits _{j=\lfloor (n-1)/2\rfloor }^{m-2}S_{n-1}^jR_j. \end{aligned}$$
(44)

The iteration terminates at \(j=\lfloor (n-1)/2\rfloor\) because \(S_n^{2n-1}=0\). A three-term recurrence applies also to the determinant \(W_p\). If we set \(W_0=1\) then, using the Laplace formula, we get:

$$\begin{aligned} W_1&= B_0W_0,\nonumber \\ W_2&= B_1W_1-A_0C_1W_0,\nonumber \\ W_m&= B_{m-1}W_{m-1}-A_{m-2}C_{m-1}W_{m-2}. \end{aligned}$$
(45)

The last equation becomes identical with Eq. (34) if we substitute

$$\begin{aligned} a^{{\mathsf {k}}}_m\left( {\mathfrak {r}}_{\mathrm {e}},s,{\mathcal {E}}\right) = (-1)^m\,\frac{W_m(\mathbb {A},\mathbb {B},\mathbb {C})}{C_1C_2\cdots C_m} =(-1)^m\,\frac{W_m(\mathbb {A},\mathbb {B},\mathbb {C})}{m!({{\mathsf {k}}})_m}, \end{aligned}$$
(46)

where \(\mathbb {A}=\{A_0,A_1,\ldots ,A_{m-2}\}\). As one can easily see,

$$\begin{aligned} (-1)^m\,\frac{W_m(\mathbb {A},\mathbb {B},\mathbb {C})}{C_1C_2\cdots C_m} =V_m(-\mathbb {T},\mathbb {P}), \end{aligned}$$
(47)

where

$$\begin{aligned} V_{m+1}(-\mathbb {T},\mathbb {P})=\left| \begin{array}{ccccccc} p_0&{}1&{}0&{}\cdots &{}0&{}0&{}0\\ -t_0&{}p_1&{}1&{}\cdots &{}0&{}0&{}0\\ 0&{}-t_1&{}p_2&{}\cdots &{}0&{}0&{}0\\ \vdots &{}\vdots &{}\ddots &{}\ddots &{} &{}\vdots &{}\vdots \\ \vdots &{}\vdots &{}\ &{}\ddots &{}\ddots &{}\vdots &{}\vdots \\ 0&{}0&{}0&{}\cdots &{}-t_{m-2}&{}p_{m-1}&{}1\\ 0&{}0&{}0&{}\cdots &{}0&{}-t_{m-1}&{}p_m \end{array} \right| =0, \end{aligned}$$
(48)

and \(\mathbb {T}=\{t_0,t_1,\ldots ,t_{m-1}\}, \mathbb {P}=\{p_0,p_1,\ldots ,p_m\}\). Then, the expansion coefficients are given by

$$\begin{aligned} a^{{\mathsf {k}}}_m\left( {\mathfrak {r}}_{\mathrm {e}},s,{\mathcal {E}}\right) = V_m(-\mathbb {T},\mathbb {P}),\;\;m=0,1,2,\ldots , \end{aligned}$$
(49)

with \(V_0=1\), and the recurrence relations (34) may be rewritten asFootnote 2

$$\begin{aligned} V_m=p_{m-1}V_{m-1}+t_{m-2}V_{m-2}. \end{aligned}$$
(50)

Let us define

$$\begin{aligned} Z_l=\sum \limits _{m=0}^l\,V_m(-\mathbb {T},\mathbb {P})\,\, {\mathfrak {r}}^m. \end{aligned}$$
(51)

Since

$$\begin{aligned} V_{l+1}\,{\mathfrak {r}}^{l+1}=Z_{l+1}-Z_l, \end{aligned}$$
(52)

using Eq. (50), we get

$$\begin{aligned} Z_{l+1}=Z_l\left( 1+p_l\,{\mathfrak {r}}\right) - Z_{l-1}\left( p_l-t_{l-1}\,{\mathfrak {r}}\right) {\mathfrak {r}}- Z_{l-2}\,t_{l-1}\,{\mathfrak {r}}^2, \end{aligned}$$
(53)

where \(Z_0=1\) and \(Z_q=0\) if \(q<0\).

4.2 Harmonium: the special case of \({\mathfrak {r}}_{\mathrm {e}}=0\)

In the case of harmonium \({\mathfrak {r}}_{\mathrm {e}}=0\), i.e., the minimum of the parabolic potential is located at \({\mathfrak {r}}=0\). In this case, the \(s\)-dependence of the equations is much simpler since \(B_m=-s\) for all values of \(m\). As a consequence,

$$\begin{aligned} R_j=-\frac{\rho _j}{s^2},\;j=0,1,2,\ldots ,m-2, \end{aligned}$$
(54)

and

$$\begin{aligned} S^m_n=(-1)^n\;\frac{\sigma ^m_n}{s^{2n}},\;n\le \lfloor {m/2}\rfloor , \end{aligned}$$
(55)

where

$$\begin{aligned} \rho _j=A_jC_{j+1}=({\mathcal {E}}-j)(j+1)(j+{{\mathsf {k}}}),\;j=0,1,2,\ldots ,m-2, \end{aligned}$$
(56)

and

$$\begin{aligned} \sigma _0^m&= {1},\nonumber \\ \sigma _n^m&= \prod \limits _{l=1}^n\;\;\sum \limits _{j_l=j_{l-1}}^{m-2n}\rho _{j_l+2(l-1)},\;\; j_0=0,\;\;n\le \lfloor {m/2}\rfloor . \end{aligned}$$
(57)

Now, Eq. (38) may be rewritten as

$$\begin{aligned} a^{{\mathsf {k}}}_m\left( 0,s,{\mathcal {E}}\right) =\frac{s^m}{m!({{\mathsf {k}}})_m} \sum \limits _{n=0}^{\lfloor {m/2}\rfloor }(-1)^n\,\frac{\sigma _n^m}{s^{2n}} \end{aligned}$$
(58)

with the dependence on \(s\) explicitly shown. In the special case of \(s=0\), corresponding to the spherical harmonic oscillator, the only nonzero contribution to Eq. (58) is given by the term with \(n=m/2\). Thus, non-vanishing coefficients correspond to \(m=2j,\;j=0,1,2,\ldots\) and

$$\begin{aligned} a^{{\mathsf {k}}}_{2j}\left( 0,0,{\mathcal {E}}\right) = \frac{\sigma _j^{2j}}{(2j)!({{\mathsf {k}}})_{(2j)}}, \end{aligned}$$
(59)

where, according to Eqs. (56) and (57),

$$\begin{aligned} \sigma _j^{2j}=\prod \limits _{n=0}^{j-1}\rho _{2n}=\prod \limits _{n=0}^{j-1} ({\mathcal {E}}-2n)(2n+1)(2n+{{\mathsf {k}}}). \end{aligned}$$
(60)

Combining Eqs. (59) and (60), we get

$$\begin{aligned} a^{{\mathsf {k}}}_{2j}\left( 0,0,{\mathcal {E}}\right) =\frac{(-1)^j(-{\mathcal {E}})_j}{j!\,2^j\,\left( ({{\mathsf {k}}}+1)/2\right) _j}. \end{aligned}$$
(61)

Equation (55) and the recurrence relations (43) and (44) imply similar recurrences for \(\sigma ^m_n\):

$$\begin{aligned} \sigma ^m_0=1,\;\;\;\sigma ^m_n=\rho _{m-2}\,\sigma ^{m-2}_{n-1}+ \sigma ^{m-1}_n, \end{aligned}$$
(62)

and

$$\begin{aligned} \sigma _n^m=\sum \limits _{j=\lfloor (n-1)/2\rfloor }^{m-2}\sigma _{n-1}^j\,\rho _j. \end{aligned}$$
(63)

Equation (46) with \({\mathfrak {r}}_{\mathrm {e}}=0\) is equivalent to Eq. (58) and, depending on the circumstances using one or another may be more convenient. In particular, comparing Eqs. (46) and (58), we get the expansion of \(W_m\), with \({\mathfrak {r}}_{\mathrm {e}}=0\), in terms of powers of \(s\):

$$\begin{aligned} W_m(\mathbb {A},\mathbb {B},\mathbb {C})=\sum \limits _{n=0}^{\lfloor {m/2}\rfloor } (-1)^{n+m}\,\sigma _n^m\,s^{m-2n}. \end{aligned}$$
(64)

The recurrence relation (62) substituted to the last equation results in Eqs. (45).

5 Odds and ends

5.1 Expansion at \(+\infty\)

One can also expand solutions of BHE at \(+\infty\) and obtain the so-called recessive Thomé solutions [29]. The recessive Thomé solution (Eq. (3.1.14) of [29]) is given by

$$\begin{aligned} P^{[\infty ]}({\mathfrak {r}})={\mathfrak {r}}^{\mathcal {E}} \sum \limits _{m=0}^\infty b_m{\mathfrak {r}}^{-m}. \end{aligned}$$
(65)

with \(b_0=1\) and

$$\begin{aligned}&\tilde{B}_0b_0+\tilde{C}_1b_1=0,\nonumber \\&\tilde{A}_mb_m+\tilde{B}_{m+1}b_{m+1}+\tilde{C}_{m+2}b_{m+2}=0,\nonumber \\&\quad m=0,1,2,\ldots \end{aligned}$$
(66)

where

$$\begin{aligned} \tilde{A}_m=({\mathcal {E}}-m)({\mathcal {E}}-m+{{\mathsf {k}}}-1),\; \tilde{B}_m=-s+{\mathfrak {r}}_{\mathrm {e}}({\mathcal {E}}+{{\mathsf {k}}}/2-m),\; \tilde{C}_m=m. \end{aligned}$$
(67)

An analysis similar to the one leading to Eq. (46) results in the following closed-form expression for the expansion coefficients:

$$\begin{aligned} b_m=\frac{(-1)^m}{m!}\, W_m(\tilde{\mathbb {A}},\tilde{\mathbb {B}},\tilde{\mathbb {C}}). \end{aligned}$$
(68)

5.2 Some special cases

The diagram representing three-term recurrence relations may also illustrate the termination of the pertinent expansions. For example, let \(a^{{\mathsf {k}}}_n\ne 0\) for \(n<3\), but \(a^{{\mathsf {k}}}_3=t_1a^{{\mathsf {k}}}_1+p_2a^{{\mathsf {k}}}_2=0\). If we wish to construct a solution for which \(a^{{\mathsf {k}}}_m=0\) if \(m\ge 3\) then also \(a^{{\mathsf {k}}}_4\) should vanish. But this is possible only if \(t_2=0\). If two consecutive coefficients (in this example \(a^{{\mathsf {k}}}_3\) and \(a^{{\mathsf {k}}}_4\)) vanish, all remaining ones with indices larger than \(4\) also vanish. The condition \(a^{{\mathsf {k}}}_3=0\) is referred to as the closing condition and is equivalent to Eq. (22). In general, if the expansion terminates at \(a^{{\mathsf {k}}}_p\), i.e., \(a^{{\mathsf {k}}}_p\ne 0\) but \(a^{{\mathsf {k}}}_{p+1}=a^{{\mathsf {k}}}_{p+2}=\cdots =0\), then

$$\begin{aligned} t_p=0 \end{aligned}$$
(69)

and

$$\begin{aligned} a^{{\mathsf {k}}}_{p+1}=\frac{(-1)^{p+1}}{(p+1)!\,({{\mathsf {k}}})_{p+1}}\, W_{p+1}(\mathbb {A},\mathbb {B},\mathbb {C})=0 \end{aligned}$$
(70)

The first of these conditions implies

$$\begin{aligned} A_p={\mathcal {E}}-p=0, \end{aligned}$$
(71)

which is equivalent to Eq. (21). The second condition reduces to \(W_{p+1}=0\). The following examples, corresponding to cases known from the literature, illustrate the procedure. In order to simplify the formulas, we set \({\mathfrak {r}}_{\mathrm {e}}=0\) and \(\mu =1/2\).

  • \(p=0\): In this case, the closing condition reduces to \(B_0=-s=0\). Then, the solution corresponds to \(p=0\) states of the spherical harmonic oscillator. \(P_0^{{\mathsf {k}}}({\mathfrak {r}})=1, E=\omega \,({{\mathsf {k}}}+1)/2\), and \(\omega\) is an arbitrary positive number.

  • \(p=1\): In this case \(P^{{\mathsf {k}}}_1({\mathfrak {r}})=1+B_0{\mathfrak {r}}= 1-s{\mathfrak {r}}\). The closing condition

    $$\begin{aligned} B_0B_1-A_0C_1=s^2-{{\mathsf {k}}}=0 \end{aligned}$$
    (72)

    leads to

    $$\begin{aligned} \omega =\frac{\zeta ^2}{{{\mathsf {k}}}}. \end{aligned}$$
    (73)

    and, consequently,

    $$\begin{aligned} E=\zeta ^2\frac{{{\mathsf {k}}}+3}{2{{\mathsf {k}}}}. \end{aligned}$$
    (74)

    Parameter \(\zeta\) is arbitrary but \(\omega\) is defined by Eq. (73). In the case of electron-electron interaction \(\zeta =1\) and, thus, \(\omega =1/{{\mathsf {k}}}\) and \(E=({{\mathsf {k}}}+3)/(2{{\mathsf {k}}})\).

5.3 Harmonic oscillator

The BHE transforms to the spherical harmonic oscillator equation if \(s=0\) and \({\mathfrak {r}}_{\mathrm {e}}=0\). In this case \(p_m=0\) and the three-term recurrence (34) simplifies to \(a^{{\mathsf {k}}}_m=t_{m-2}a^{{\mathsf {k}}}_{m-2}\). An inspection of Fig. 1 shows that the only nonzero coefficients are \(a^{{\mathsf {k}}}_0=1, a^{{\mathsf {k}}}_2=t_0, a^{{\mathsf {k}}}_4=t_0t_2, \ldots , a^{{\mathsf {k}}}_{2n}=t_0t_2\ldots t_{2n-2}\). The condition for the termination of the recurrence is the quantization condition and if \(a^{{\mathsf {k}}}_{2n}\) is the last term of the expansion then \(n={{\mathsf {n}}}\), where \({{\mathsf {n}}}\) is the principal quantum number, and \({\mathcal {E}}_{{\mathsf {n}}}^{{\mathsf {k}}}=2n\), i.e., \(E_{{{\mathsf {n}}}{{\mathsf {l}}}}=\omega \left( 2{{\mathsf {n}}}+ ({{\mathsf {k}}}+1)/2\right)\). The explicit form of the expansion coefficients may be easily obtained using Eqs. (35). We get

$$\begin{aligned} a^{{\mathsf {k}}}_{2j}=\frac{2^{-j}\,(\mathsf {-n})_j}{j!\,\left( ({{\mathsf {k}}}+1)/2\right) _j}. \end{aligned}$$
(75)

One can see that this expression may also be obtained from Eq. (61) upon the substitution \({\mathcal {E}}=2n\). Thus,

$$\begin{aligned} P_\mathsf{n}^\mathsf{k}({\mathfrak {r}})={}_1F_1\left( -{{\mathsf {n}}};\frac{{{\mathsf {k}}}+1}{2}; \frac{{\mathfrak {r}}^2}{2}\right) , \end{aligned}$$
(76)

as it should be for the spherical harmonic oscillator (see, e.g., [48]).

6 Several remarks on the non-polynomial solutions

As it was already mentioned, the family of the Heun equations, including the BHE, was studied by the mathematicians since more than a century [29, 30, 3538]. A very rich bibliography of the texts published on the Heun functions throughout the years has been collected in the framework of The Heun Project: Heun functions, their generalizations and applications created at the University of Sofia [49]. In this section, some general results derived in the mathematical literature are briefly discussed and transformed to a form suitable for quantum chemical implementations.

6.1 Some general properties BHE

The constant \(K(\alpha ,\beta ,\gamma ,\delta )\) in Eq. (29) which determines the asymptotic behavior of \(N(\alpha ,\beta ,\gamma ,\delta ;x)\) for \(x\rightarrow \infty\) is given by [35, 36]

$$\begin{aligned} K(\alpha ,\beta ,\gamma ,\delta )=\mathcal {C}(\alpha ,\gamma ) J_\lambda \left( \frac{\alpha +\gamma }{2},\beta ,\frac{3\alpha -\gamma }{2}, \delta +\beta \frac{\gamma -\alpha }{2}\right) , \end{aligned}$$
(77)

where

$$\begin{aligned} \mathcal {C}(\alpha ,\gamma )&= \frac{\varGamma (1+\alpha )}{\varGamma \left( \frac{\alpha -\gamma }{2}\right) \varGamma \left( \frac{\alpha +\gamma }{2}+1\right) },\end{aligned}$$
(78)
$$\begin{aligned} J_\lambda (a,b,c,d)&= \int \limits _0^\infty \,x^{\lambda -1}{\mathrm {e}}^{-bx-x^2} N(a,b,c,d;x)\hbox {d}x \end{aligned}$$
(79)

and \(\lambda =(\gamma +\alpha )/2+1\). The integral is absolutely convergent in a rather narrow range of the parameters: \(0<\lambda <1+(\alpha +\gamma )/2\) [35]. However, for our aims, the absolute convergence is not necessary. Besides, in some cases, the singularities which appear when the integral is divergent determine the energy eigenvalues.

Using Eqs. (26), (27) and (77), we can express \({\mathcal {K}}\left( {{\mathsf {k}}},{\mathfrak {r}}_{\mathrm {e}},s,{\mathcal {E}}\right)\) from Eq. (30) as

$$\begin{aligned} {\mathcal {K}}\left( {{\mathsf {k}}},{\mathfrak {r}}_{\mathrm {e}},s,{\mathcal {E}}\right) = c_k(\lambda )\sum \limits _{m=0}^{\infty }\, a^\lambda _m({\mathfrak {r}}_{\mathrm {e}}^\prime , s^\prime ,{\mathcal {E}}^\prime )\,G_{{\mathfrak {r}}_{\mathrm {e}}}(\lambda +m), \end{aligned}$$
(80)

where

$$\begin{aligned} c_{{\mathsf {k}}}(\lambda )&= \frac{\varGamma ({{\mathsf {k}}})\,2^{\lambda /2}}{\varGamma ({{\mathsf {k}}}-\lambda ) \varGamma (\lambda )}{\mathrm {e}}^{-{\mathfrak {r}}_{\mathrm {e}}^2/2},\end{aligned}$$
(81)
$$\begin{aligned} \lambda&= k+{\mathcal {E}}+1,\nonumber \\ {\mathfrak {r}}_{\mathrm {e}}^\prime&= {\mathfrak {r}}_{\mathrm {e}},\\ s^\prime&= s-{\mathfrak {r}}_{\mathrm {e}}\, ({\mathcal {E}}+{{\mathsf {k}}}/2+1),\nonumber \\ {\mathcal {E}}^\prime&= -{\mathcal {E}}-2,\nonumber \end{aligned}$$
(82)

and, according to Eqs. (3.462) and (3.478) of Ref. [50],

$$\begin{aligned} G_{{\mathfrak {r}}_{{\mathrm {e}}}}(\nu )=\int \limits _0^\infty {\mathfrak {r}}^{\nu -1} {\mathrm {e}}^{-({\mathfrak {r}}-{\mathfrak {r}}_{\mathrm {e}})^2/2} \hbox {d}{\mathfrak {r}}=\left\{ \begin{array}{ll} \displaystyle \varGamma (\nu )D_{-\nu }(-{\mathfrak {r}}_{\mathrm {e}}) {\mathrm {e}}^{-{\mathfrak {r}}_{\mathrm {e}}^2/4},&{}\text{ if }\; {\mathfrak {r}}_{\mathrm {e}}\ne {0},\\ \displaystyle 2^{\nu /2-1}\,\varGamma (\nu /2),&{}\text{ if }\; {\mathfrak {r}}_{\mathrm {e}}={0}. \end{array}\right. , \end{aligned}$$
(83)

where \(D_{-\nu }(-{\mathfrak {r}}_{\mathrm {e}})\) is the parabolic cylinder function.

The coefficients \(a^\lambda _m\) in Eq. (80) can be expressed in a closed form using Eq. (49). By the substitution of the parameters defined in Eqs. (82), we get

$$\begin{aligned} a^\lambda _m({\mathfrak {r}}_{\mathrm {e}}^\prime ,s^\prime ,{\mathcal {E}}^\prime ) =V_m\left( -\mathbb {T}^\prime ,\mathbb {P}^\prime \right) , \end{aligned}$$
(84)

where \(\mathbb {T}^\prime =\{t_0^\prime ,t_1^\prime ,\ldots , t_{m-1}^\prime \}, \mathbb {P}^\prime =\{p_0^\prime ,p_1^\prime , \ldots ,p_m^\prime \}\) and

$$\begin{aligned} t_n^\prime&= \frac{{\mathcal {E}}+n+2}{({\mathcal {E}}+{{\mathsf {k}}}+n+2)(n+2)}, \;\;\;n=0,1,\ldots ,m-1,\nonumber \\ p_n^\prime&= \frac{s-{\mathfrak {r}}_{\mathrm {e}} ({\mathcal {E}}+{{\mathsf {k}}}/2+n+1)}{({\mathcal {E}}+{{\mathsf {k}}}+n+1)(n+1)}, \;\;\;n=0,1,\ldots ,m. \end{aligned}$$
(85)

6.2 Harmonium

The formulas simplify if we set \({\mathfrak {r}}_{\mathrm {e}}=0\), i.e., if we consider harmonium. Then

$$\begin{aligned} G_0(\lambda +m)=2^{(\lambda +m)/2-1}\varGamma \left( \frac{\lambda +m}{2}\right) . \end{aligned}$$
(86)

Thus,

$$\begin{aligned} G_0(\lambda +m)=2^{(\lambda +m)/2-1}\left\{ \begin{array}{ll} \varGamma (\frac{\lambda }{2})\, (\frac{\lambda }{2})_l, &{}\text{ if }\;m=2l,\;l=0,1,2,\ldots ,\\ \varGamma (\frac{\lambda +1}{2})\,(\frac{\lambda +1}{2})_l,&{} \text{ if }\;m=2l+1. \end{array}\right. \end{aligned}$$
(87)

Let us denote \(d_m^{\,{{\mathsf {k}}}}(\lambda )= c_{{\mathsf {k}}}(\lambda )G_0(\lambda +m)\). Then, using the duplication formula for the gamma function

$$\begin{aligned} \varGamma (\lambda )=\frac{2^{\lambda -1}}{\sqrt{\pi }}\; \varGamma \left( \frac{\lambda }{2}\right) \varGamma \left( \frac{\lambda +1}{2}\right) , \end{aligned}$$
(88)

we get

$$\begin{aligned} d_m^{\,{{\mathsf {k}}}}(\lambda )=\frac{\sqrt{\pi }\varGamma ({{\mathsf {k}}})}{\varGamma ({{\mathsf {k}}}-\lambda )} \left\{ \begin{array}{ll} \displaystyle 2^j\,\varGamma \left( \frac{\lambda +1}{2}\right) ^{-1} \left( \frac{\lambda }{2}\right) _j,&{}\text{ if }\;m=2j,\; j=0,1,2,\ldots ,\\ \displaystyle 2^{j+1/2}\,\varGamma \left( \frac{\lambda }{2}\right) ^{-1} \left( \frac{\lambda +1}{2}\right) _j,&{}\text{ if }\;m=2j+1, \end{array}\right. \end{aligned}$$
(89)

According to Eq. (58),

$$\begin{aligned} a_m^\lambda \left( 0,s,-{\mathcal {E}}-2\right) =\sum \limits _{n=0}^{\lfloor {m/2}\rfloor }(-1)^n\,\tilde{\sigma }_n^m\, \frac{s^{m-2n}}{m!(\lambda )_m}, \end{aligned}$$
(90)

where \(\tilde{\sigma }_n^m\) is determined in terms of

$$\begin{aligned} \tilde{\rho }_j=-({\mathcal {E}}+2+j)(j+1)(j+\lambda ) \end{aligned}$$
(91)

rather than in terms of \(\rho _j\) as defined in Eq. (56). Alternatively we can express \(a_m\) in terms of determinants \(V_m\) using Eq. (84).

Integrals \(J_\lambda (a,b,c,d)\) fulfill the following recurrence relation [35]:

$$\begin{aligned} (c+a-2-2\lambda )J_{\lambda +2}-\frac{1}{2}\left( d+b(2\lambda +1-a)\right) J_{\lambda +1}+\lambda (\lambda -a)J_\lambda =0. \end{aligned}$$
(92)

In some analyses, this recurrence relation may be very useful. In terms of the parameters describing harmonium, it reads

$$\begin{aligned} 2({\mathcal {E}}+3)J_{{\mathcal {E}}+{{\mathsf {k}}}+3}+ \sqrt{2}\left( s-{\mathfrak {r}}_{\mathrm {e}} ({\mathcal {E}}+2)\right) J_{{\mathcal {E}}+{{\mathsf {k}}}+2}- ({\mathcal {E}}+{{\mathsf {k}}}+1)J_{{\mathcal {E}}+{{\mathsf {k}}}+1}=0 \end{aligned}$$
(93)

As an example of interesting consequences of this relation let us note that for \({{\mathsf {k}}}=2\) and for arbitrary \(s\) and \({\mathfrak {r}}_{\mathrm {e}}\), the values of \({\mathcal {E}}\) for which condition \(J_{{\mathcal {E}}+4}=0\) is fulfilled may also be derived from \(J_{{\mathcal {E}}+3}=2J_{{\mathcal {E}}+5}\).

6.3 Spherical harmonic oscillator: the special case of \({\mathfrak {r}}_{\mathrm {e}}=0\) and \(s=0\)

If \({\mathfrak {r}}_{\mathrm {e}}=0\) and \(s=0\) then, according to Eqs. (59) and (90) for \(m=2j, j=0,1,2,\ldots\)

$$\begin{aligned} a_{2j}^\lambda \left( 0,0,-{\mathcal {E}}-2\right) = \frac{(-1)^j\tilde{\sigma }_j^{2j}}{(2j)!(\lambda )_{(2j)}} \end{aligned}$$
(94)

and \(a_{2j+1}=0\). According to Eqs. (60) and (91)

$$\begin{aligned} \tilde{\sigma }_j^{2j}=(-1)^j\prod \limits _{n=0}^{j-1} ({\mathcal {E}}+2+2n)(2n+1)(2n+\lambda ). \end{aligned}$$
(95)

Combining Eqs. (89), (94), (95) and using several times the duplication formula (88), we get

$$\begin{aligned} {\mathcal {K}}({{\mathsf {k}}},0,0,{\mathcal {E}}))=\frac{\sqrt{\pi }}{2^\lambda } \frac{\varGamma (2c-2a)\;{}_2F_1(a,b;c;1)}{\varGamma (1-2a)\varGamma (c)}, \end{aligned}$$
(96)

where \(a={\mathcal {E}}/2+1, b=\lambda /2, c=(\lambda +1)/2\). The hypergeometric function may be expressed by the gamma functions using equation ([50], 9.122)

$$\begin{aligned} {}_2F_1(a,b;c;1)=\frac{\varGamma (c)\varGamma (c-a-b)}{\varGamma (c-a)\varGamma (c-b)}. \end{aligned}$$
(97)

After the substitution to Eq. (96) and some simple transformations, we get a surprisingly simple expression

$$\begin{aligned} {\mathcal {K}}({{\mathsf {k}}},0,0,{\mathcal {E}})= \varGamma \left( \frac{{{\mathsf {k}}}+1}{2}\right) \varGamma \left( -\frac{{\mathcal {E}}}{2}\right) ^{-1}. \end{aligned}$$
(98)

The same result may be obtained by the straightforward evaluation of \(J_\lambda\) according to Eq. (79) with the Heun function given by Eq. (76). Roots of equation \({\mathcal {K}}({{\mathsf {k}}},0,0,{\mathcal {E}})=0\) are equal to \({\mathcal {E}}=2\mathrm {n}, \mathrm {n}=0,1,2,\ldots ,\) and the substitution of these roots to the appropriate expansion gives the radial wavefunctions (76).

7 Final remarks

The quest of square-integrable analytical solutions of BHE, apart of the mathematical interest, has been motivated by numerous applications in theory of atomic and molecular structure. The applications range from the analysis of the behavior of the wavefunction in the vicinity of the Coulomb singularity [18, 20, 43] and the construction of the exact density functionals ([51] and references therein) to the studies on the dependence of the charge density distribution in a molecule on the masses of the constituent particles [52, 53]. Until now, these applications are restricted to the well-known polynomial solutions. An extension to the non-polynomial ones is an interesting and important challenge. Possibly, some further studies on the properties of the solutions of BHE may result in tractable algorithms for deriving the eigenvalues and deriving the analytic forms of square-integrable non-polynomial solutions. Maybe, by expressing the formal solution of BHE in terms of the Sturm functions or the hypergeometric functions rather than in powers of \(r,\) one could easily reduce the set of solutions to the space of square-integrable functions. Certainly, by using the Heun equation, we can see the problem of harmonium from a wider perspective and get new, powerful technical tools to study its properties.