This might be a duplicate, nevertheless, I will ask the question :
Wieferich primes : A prime $p$ is a Wieferich prime, if $2^{p-1}\equiv 1\pmod{p^2}$. The only known Wieferich primes are $1093$ and $3511$.
I only found $1093^2$ and $3511^2$ to be a strong fermat-pseudoprime to base $2$ and to be not squarefree. Those numbers are not strong fermat-pseudoprime to base $3$.
Is there a natural number $n>1$ with the following properties ?
- n is not squarefree
- n is a strong fermat-pseudoprime to base $2$ and $3$
Assuming, the only Wieferich primes are $1093$ and $3511$, can it be shown that a number with the desired property cannot exists ?
Let $p$ be an odd prime, and $k$ the order of $2$ modulo $p$. Then either $2^k \equiv 1 \pmod{p^2}$, or the order of $2$ modulo $p^2$ is $p \cdot k$. Thus if $n$ is an odd number that is not squarefree and a Fermat pseudoprime to base $2$, and $p^2\mid n$, since $\gcd(p,n-1) = 1$, it follows that $2^{p-1} \equiv 1 \pmod{p^2}$, so $p$ must be a Wieferich prime. The analogous argument works for base $3$, so if such an $n$ exists, there must exist a Wieferich prime such that also $3^{p-1} \equiv 1 \pmod{p^2}$. So assuming there are no further Wieferich primes, since $3^{p-1} \not\equiv 1 \pmod{p^2}$ for $p = 1093$ and $p = 3511$, such a number cannot exist.