Can the equation $\cfrac{n^2(s-2)-n(s-4)}{2}=2^p-1$ be transformed into an equation of the form $x^2 + D=AB^y$ (where $D,A,B$ are fixed and $x,y$ are variables) when the variable $s$ is fixed to any value $s \ge 3$. For example, if $s$=3, then we get $\cfrac{n(n+1)}{2} = 2^p-1$, which can be transformed into $(2n+1)^2=2^{p+3} -7$, which is an equation of the previous form ($x=2n+1, y=p+3, D=7, A=1, B=2$).
!$n,s,p,x,y,D,A,B$ are positive integers!
Background: $\cfrac{n^2(s-2)-n(s-4)}{2}$ is the equation for polygonal numbers, where $s$ is the number of sides, and $n$ as in the $n^{th}$ $s$-gonal number. $2^p-1$ is the equation for Mersenne numbers. It has been proven that the number of solutions in each case of $x^2 + D=AB^y$ ($x,y$ are the variables) is finite, therefore if for every $s$ the formula for finding polygonal Mersene numbers can be transformed into $x^2 + D=AB^y$, it is also true that there are a finite number of Mersenne numbers for each $s$-gonal number.
Any advice on how to prove/disprove this would be greatly appreciated, even if you do not know how to prove/disprove it, if you have any ideas on where I should start please comment/answer
We have $$\begin{align}&\frac{n^2(s-2)-n(s-4)}{2}=2^p-1\\&\Rightarrow 8(s-2)\cdot \frac{n^2(s-2)-n(s-4)}{2}=8(s-2)(2^p-1)\\&\Rightarrow 4(s-2)^2n^2-4n(s-4)(s-2)=8(s-2)(2^p-1)\\&\Rightarrow 4(s-2)^2n^2-4n(s-4)(s-2)+(s-4)^2=8(s-2)(2^p-1)+(s-4)^2\\&\Rightarrow (2(s-2)n-(s-4))^2=8(s-2)2^p-8(s-2)+(s-4)^2\\&\Rightarrow (2(s-2)n-s+4)^2+(-s^2+16s-32)=(s-2)\cdot 2^{p+3}\end{align}$$