Prove that if $n^2 - 1$ is divisible by a prime number $p$ such that $n - 1$ is not divisible by $p$, then $n + 1$ is also divisible by $p$.

If this proposition is false, please give at least $3$ counter-examples, and try to modify the proposition so that it becomes true.

If the proposition is true, please try to prove this even more general proposition:

If $B^n - 1$ is divisible by a prime number $p$ such that $B^m - 1$ is not divisible by $p$ for all $m < n$, then $B^{n-1} + 1$ is also divisible by $p$.

.

Note: This question is actually related to numeral bases.

If $B + 1$ is divisible by a prime $p$ then the reciprocal of $p$ in base $B$ has a repeating mantissa of 2 digits.

If $B^2 - 1$ is divisible by a prime $p$ (and $B - 1$ is not) then the reciprocal of $p$ in base $B$ has a repeating mantissa of 2 digits.

I'm trying to show that these two propositions are kind of equivalent.

More generally: If $B^n - 1$ is divisible by a prime $p$ (and $B^m - 1$ is not, for all $m < n$) then the reciprocal of $p$ in base $B$ has a repeating mantissa of $n$ digits.

And we have: $n = \frac{p-1}{k}$ for a positive integer $k$.

(I've found these things myself so maybe I've made some mistakes.)

.

If $B^{2n} - 1$ is divisible by a prime number $p$ such that $B^m - 1$ is not divisible by $p$ for all $m < 2n$, then $B^n + 1$ is also divisible by $p$.
• If $p |ab$, then $p | a$ or $p | b$. – user61527 Jun 8 '14 at 21:01
For the original question note that $n^2-1=(n+1)(n-1)$, hence any $p$ dividing $n^2-1$ must divide one of $n+1$, $n-1$.
The generalization is wrong if $n>2$. Indeed if $p\mid B^n-1$ and $p\mid B^{n-1}+1$, then also $p\mid B(B^{n-1}+1)-(B^n-1)=B+1$ and hence $p\mid B^2-1$.
You have $n^2-1=(n-1)(n+1)$ so that if $p|(n^2-1)$ then $p|(n-1)$ or $p|(n+1)$ since p is prime. This proves your first claim. Your claim with $B^{n}-1$ is false (wrong generalization). Take $3^3-1=26$ and $p=13$.