Euler pseudoprime (source code)

= Euler pseudoprime
{c}
{wiki}

An <odd integer> $N$ that is a <composite number> is an <Euler pseudoprime> to a base $b$ <coprime> to $N$ when
$$
b^{(N-1)/2}\equiv\left(\frac bN\right)\pmod N,
$$
where the right-hand side is the <Jacobi symbol>. Here this term refers to the Euler-Jacobi condition, rather than merely requiring the left side to be one of $\pm1$.

Every <odd prime> satisfies this congruence by <Euler's criterion>, because its <Jacobi symbol> is the <Legendre symbol>. A composite passing it is therefore a false positive for that base in the <Solovay-Strassen primality test>. For example, $N=561$ and $b=2$ pass: $2^{40}\equiv1\pmod{561}$ gives $2^{280}\equiv1$, and $(2/561)=1$. A failed congruence instead supplies an <Euler witness>.