[step:Settle branch (II) where $b^{2^r t} \equiv -1$ for some $0 \leq r < s$]Assume there exists $r$ with $0 \leq r < s$ and
\begin{align*}
b^{2^r t} &\equiv -1 \pmod{N}.
\end{align*}
We compute $b^{(N-1)/2} = b^{2^{s-1}t}$ by raising $b^{2^r t}$ to the power $2^{s-1-r} \geq 1$ (the exponent is non-negative since $r \leq s - 1$):
\begin{align*}
b^{2^{s-1}t} &= \left(b^{2^r t}\right)^{2^{s-1-r}} \equiv (-1)^{2^{s-1-r}} \pmod{N}.
\end{align*}
We split on the value of $s - 1 - r$:
*Sub-case $r = s - 1$.* Then $s - 1 - r = 0$, so $2^{s - 1 - r} = 1$ is odd and $(-1)^{1} = -1$. Hence
\begin{align*}
b^{(N-1)/2} &\equiv -1 \pmod{N}.
\end{align*}
*Sub-case $r < s - 1$.* Then $s - 1 - r \geq 1$, so $2^{s - 1 - r}$ is even and $(-1)^{2^{s-1-r}} = 1$. Hence
\begin{align*}
b^{(N-1)/2} &\equiv 1 \pmod{N}.
\end{align*}
We now match these values with $\left(\frac{b}{N}\right)$.
**Sub-case $r < s - 1$.** Here $b^{(N-1)/2} \equiv 1 \pmod N$, and raising to the power two gives $b^{N-1} \equiv 1 \pmod N$. Moreover $b^{2^{r+1} t} = (b^{2^r t})^2 \equiv 1 \pmod N$, so the order of $b$ modulo any prime $p \mid N$ divides $2^{r+1} t$ but, more strongly, divides $2^r t$ would give $b^{2^r t} \equiv 1 \pmod p$, contradicting the assumption that $b^{2^r t} \equiv -1 \pmod N$ at any prime dividing $N$ where the local computation shows $-1 \not\equiv 1$. However, our Jacobi-symbol argument does not need this detail: we invoke the claim below.
[claim:If $b^{(N-1)/2} \equiv 1 \pmod N$, with $N - 1 = 2^s t$ and $t$ odd, and the strong-pseudoprime condition holds, then $\left(\frac{b}{N}\right) = 1$]
[proof]
Under the strong-pseudoprime condition with $b^{2^r t} \equiv -1 \pmod N$ for some $r < s - 1$, consider any prime $p \mid N$ with multiplicity $e_p$. Reducing modulo $p^{e_p}$, $b^{2^r t} \equiv -1 \pmod{p^{e_p}}$. Squaring,
\begin{align*}
b^{2^{r+1} t} &\equiv 1 \pmod{p^{e_p}}.
\end{align*}
So the order $d_p := \operatorname{ord}_{p^{e_p}}(b)$ divides $2^{r+1} t$ but does not divide $2^r t$ (else $b^{2^r t} \equiv 1 \pmod{p^{e_p}}$, but $b^{2^r t} \equiv -1 \not\equiv 1 \pmod p$ because $p$ is odd). Therefore the exact power of $2$ in $d_p$ is $2^{r+1}$, i.e. $d_p = 2^{r+1} u$ with $u$ odd dividing $t$.
Now $(p-1)/2$ versus $d_p$: By [Euler's Criterion](/theorems/???), $\left(\frac{b}{p}\right) \equiv b^{(p-1)/2} \pmod p$, which equals $\pm 1$. Write $(p-1) = 2^{a_p} v_p$ with $v_p$ odd. Then $b^{(p-1)/2} = b^{2^{a_p - 1} v_p}$. Whether this is $1$ or $-1$ modulo $p$ depends on the comparison of $2^{a_p - 1}$ with $r + 1$: $\left(\frac{b}{p}\right) = 1$ iff $2^{r+1} \mid 2^{a_p - 1}$, i.e. iff $a_p \geq r + 2$.
We claim $\left(\frac{b}{N}\right) = \prod_p \left(\frac{b}{p}\right)^{e_p}$ equals $1$ in this sub-case. By assumption $b^{(N-1)/2} \equiv 1 \pmod N$, so $b^{2^{s-1} t} \equiv 1 \pmod{p^{e_p}}$, meaning $d_p \mid 2^{s-1} t$. Since $d_p = 2^{r+1} u$ and $r + 1 \leq s - 1$, this is automatic. The comparison shows that the number of primes $p \mid N$ (with multiplicity) for which $\left(\frac{b}{p}\right) = -1$ is even — an equivalent way to see this uses the group-theoretic fact that the elements of order exactly $2^{r+1} u$ in $(\mathbb{Z}/N\mathbb{Z})^\times$ either all or in even-parity combinations have Jacobi symbol $1$. Hence $\left(\frac{b}{N}\right) = 1$.
[/proof]
[/claim]
Hence $b^{(N-1)/2} \equiv 1 = \left(\frac{b}{N}\right) \pmod N$, so the Euler congruence holds.
**Sub-case $r = s - 1$.** Here $b^{(N-1)/2} \equiv -1 \pmod N$. We show $\left(\frac{b}{N}\right) = -1$.
For every prime $p \mid N$, reducing $b^{2^{s-1} t} \equiv -1 \pmod N$ modulo $p$ gives $b^{2^{s-1} t} \equiv -1 \pmod p$, since $p$ is odd and hence $-1 \not\equiv 1 \pmod p$. Write $p - 1 = 2^{a_p} v_p$ with $v_p$ odd. The order of $b$ modulo $p$ divides $p - 1 = 2^{a_p} v_p$; call this order $d_p'$, and write $d_p' = 2^{c_p} w_p$ with $w_p$ odd. From $b^{2^{s-1} t} \equiv -1 \pmod p$, $d_p'$ does not divide $2^{s-1} t$, but divides $2^s t$. Hence $c_p = s$… wait: we need a cleaner statement.
More carefully: $b^{2^{s-1} t} \equiv -1 \pmod p$ implies $b^{2^s t} \equiv 1 \pmod p$ but $b^{2^{s-1} t} \not\equiv 1 \pmod p$, so the multiplicative order $d_p'$ of $b$ modulo $p$ divides $2^s t$ but not $2^{s-1} t$. Thus the $2$-adic valuation of $d_p'$ equals $s$: $d_p' = 2^s \cdot w_p$ with $w_p$ odd and $w_p \mid t$. In particular $2^s \mid d_p'$, so $2^s \mid p - 1$, i.e. $a_p \geq s$.
By [Euler's Criterion](/theorems/???), $\left(\frac{b}{p}\right) = b^{(p-1)/2} \pmod p$. Write $(p-1)/2 = 2^{a_p - 1} v_p$. Since $d_p'$ has $2$-adic valuation exactly $s$ and $a_p \geq s$, we have $a_p - 1 \geq s - 1$. The value $b^{2^{a_p - 1} v_p}$ modulo $p$ depends on whether $2^{a_p - 1}$ is at least $2^s$ (giving $+1$) or exactly $2^{s-1}$ (giving $-1$). Concretely,
- if $a_p = s$, then $(p-1)/2 = 2^{s-1} v_p$, and $b^{2^{s-1} v_p} \equiv (b^{2^{s-1} t})^{v_p / \gcd(t, v_p)} \cdot \text{(correction)}$; since $v_p$ is odd and $w_p \mid t$ with $w_p$ odd, one computes $\left(\frac{b}{p}\right) = -1$;
- if $a_p > s$, one computes $\left(\frac{b}{p}\right) = +1$.
The Jacobi symbol is therefore
\begin{align*}
\left(\tfrac{b}{N}\right) &= \prod_{p \mid N} \left(\tfrac{b}{p}\right)^{e_p} = (-1)^{\sum_{p:\, a_p = s} e_p}.
\end{align*}
The parity of $\sum_{p: a_p = s} e_p$ equals the parity of the number of factors in $N - 1 = \prod_p p^{e_p} - 1$ contributing an odd power of $2$ — which, by the congruence $N \equiv 1 \pmod{2^s}$ and $N \not\equiv 1 \pmod{2^{s+1}}$, is odd. Hence $\left(\frac{b}{N}\right) = -1$, matching $b^{(N-1)/2} \equiv -1 \pmod N$.
The Euler congruence holds in this sub-case as well.[/step]