Prove that an odd square cannot be a pseudoprime with both base 2 and base 3

164 Views Asked by At

Background: The Baillie PSW primality test 1 tests if the number is a square before the Selfridge parameter selection. The Mathematica implementation of PrimeQ does not test if the number is square, but tests if the number is not both a pseudoprime with base 2 and a pseudoprime with base 3. Apparently a square number cannot pass both tests, as otherwise the Selfridge selection would fail. I could not find any example of a square number that passed both tests to about $5\cdot10^{18}$.

My question is: Can it be proved that an odd square number cannot be both pseudoprime with base 2 and a pseudoprime with base 3?