Smallest odd number n such that $2^n-1$ is divided by twin primes. This is a problem from Elementary Number Theory by Burton (7th ed.)
I am finding the smallest odd number n such that $2^n-1$ is divided by twin primes $p$ and $q$, where $3 < p < q$.
I followed a hint from the book, and result are $p \equiv -1\pmod {24}$ and $q \equiv 1\pmod {24}$. Now, how can I solve this?
 A: The first pair of twin primes $\equiv \pm 1\pmod{24}$ is $p=71$, $q=73$. One checks that $2^n\equiv \pmod p\iff 35\mid m$ and $2^n\equiv \pmod q\iff 9\mid m$. This would yield $\color{red}{n=315}$ as candidate.
The next suitable twin primes would be $192\pm 1$. Here the orders of $2$ are $95$ and $96$, thus yielding much larger $n$.
The next suitable twins are $312\pm1$.
We suspect that $315$ is indeed minimal and can work downwards from there. As we are only interested in twin primes $>2^8$, crude factorizations of $2^n-1$ would often suffice to show that no twins occur. (Contrary to this bold statement, I am however having difficulties at first glance to exclude that $2^{313}-1$ has some quite large twin prime factors). [In fact $2^{313}-1$ doesn't; it is the product of 4 primes whose differences are not small.]
A: You have $p=24k-1, q=24k+1$.  I would just start looking at twin primes of that form.  For $k=3$, we get $p=71, q=73$, which are both prime, so we would need $2^n-1$ to be divisible by $5183=71\cdot 73$  We know that if $n=ab$, $2^n-1$ is divisible by both $2^a-1$ and $2^b-1$, so we can look for the first $2^a-1$ divisible by $71$ and $2^b-1$ divisible by $73$.  A brute force search says $a=35, b=9$, so $n=315$ works.  To prove this is minimal, you would have to show that there is not a higher twin prime pair that divides a lower $2^n-1$.  The easiest way is just to factor all the smaller $2^n-1$s and look.
