An equation of the form : x^2 + D = A B^n for fixed
D,
A,
B and variable
x,
n is said to be of
Ramanujan–Nagell type. The result of
Siegel implies that the number of solutions in each case is finite. By representing n = 3m + r with r\in\{0,1,2\} and B^n = B^r y^3 with y=B^m, the equation of Ramanujan–Nagell type is reduced to three
Mordell curves (indexed by r), each of which has a finite number of integer solutions: : r=0:\qquad (Ax)^2 = (Ay)^3 - A^2D, : r=1:\qquad (ABx)^2 = (ABy)^3 - A^2B^2D, : r=2:\qquad (AB^2x)^2 = (AB^2y)^3 - A^2B^4D. The equation with A=1,\ B=2,\ D>0 has at most two solutions, except in the case D=7 corresponding to the Ramanujan–Nagell equation. This does not hold for D, such as D=-17, where x^2 - 17 = 2^n has the four solutions (x,n) = (5,3),(7,5),(9,6),(23,9). In general, if D=-(4^k-3\cdot2^{k+1}+1) for an integer k\geqslant3 there are at least the four solutions : (x,n) = \begin{cases}(2^k-3,3)\\(2^k-1,k+2)\\(2^k+1,k+3)\\(3\cdot2^k-1,2k+3)\end{cases} and these are the only four if D>-10^{12}. There are infinitely many values of
D for which there are exactly two solutions, including D = 2^m - 1. ==Equations of Lebesgue–Nagell type==