How do I solve this over the integers

88 Views Asked by At

I have this equation:

$\frac{2(2^{p} + n^{2} - 1 - 2n)}{n(n-1)} == s, p >= 1, n >= 3, s >= 3$

For which $n$ and $p$ is $s$ an integer? I dont really have a good idea on how to solve this problem. Any help would be apreciated.

-Redelectrons

1

There are 1 best solutions below

1
On BEST ANSWER

It's an integer if and only if $n(n-1)$ divides $2(2^p+n^2-1-2n)$; since $n$ and $n-1$ are relatively prime, this is if and only if both $n$ and $n-1$ separately divide $2(2^p+n^2-1-2n)$; equivalently, if and only if \begin{align*} 2(2^p+n^2-1-2n) \equiv 0\pmod n \quad&\text{and}\quad 2(2^p+n^2-1-2n) \equiv 0\pmod {n-1} \\ 2(2^p-1) \equiv 0\pmod n \quad&\text{and}\quad 2(2^p-2) \equiv 0\pmod {n-1} \\ 2^p-1 \equiv 0\pmod{\frac n{(n,2)}} \quad&\text{and}\quad 2^{p-1}-1 \equiv 0\pmod{\frac{n-1}{(n-1,4)}} \\ 2^p\equiv1\pmod{\frac n{(n,2)}} \quad&\text{and}\quad 2^{p-1}\equiv1\pmod{\frac{n-1}{(n-1,4)}}. \end{align*} Since $2$ must be relatively prime to both $\frac n{(n,2)}$ and $\frac{n-1}{(n-1,4)}$ for these to be satisfied, we must have $n\equiv2,3\pmod4$ or $n\equiv5\pmod8$.

At this point, the answer depends on the orders (call them $o_1$ and $o_2$) of $2$ modulo these fractions; if those orders are relatively prime, then one can find $p$ such that $p$ is a multiple of $o_1$ while $p-1$ is a multiple of $o_2$. A closed form for all possible solutions seems hopeless.