Here : https://en.wikipedia.org/wiki/Wieferich_prime
I came across the following claim :
A prime divisor $p$ of $M_q$, where $q$ is prime, is a Wieferich prime if and only if $p^2\mid M_q$.
The part, I cannot prove : If $M=2^q-1$ , $q$ prime and $p\mid M$ is a prime factor of $M$ satisfying $2^{p-1}\equiv 1\mod p^2$ (in other words, $p$ is a Wieferich-prime) , then we also have $p^2\mid M$ or alternatively formulated : $2^q\equiv 1\mod p^2$
I only could conclude that $ord_2(p^2)\mid p-1$ , but not $ord_2(p^2)=q$ as claimed. What do I miss ? How can I prove this part ?
Obviously, $q \mid p-1$. Write $p-1=q\cdot a$.
Then $p^2 \mid 2^{q\cdot a}-1=(2^q-1)(2^{q(a-1)}+2^{q(a-2)}+\ldots +1)$.
Observe now that the second parentheses is $\equiv a\pmod{p}$ since each summand is $\equiv 1\pmod{p}$.
Observe also that $a<p$.
This shows that $p \nmid(2^{q(a-1)}+2^{q(a-2)}+\ldots +1)$ which means that the whole $p^2$ divides the first parentheses and so $p^2 \mid 2^q-1$.
EDIT: $p-1=q\cdot a\ge a$. This means that $a\le p-1<p$ and hence $a<p$.