Note that working mod 645,
2^((645 - 1)/2) = 2^322
.....................= (2^14)^23
.....................= 259^23
.....................= (259^3)^7 * 259^2
.....................= 259^7 * 259^2
.....................= (259^3)^3
.....................= 259^3
.....................= 259 (mod 645), which is not 1 or -1 mod 645.
However,
2^(645 - 1) = (2^322)^2
................= 259^2
................= 1 (mod 645).
Hence, 645 is (Fermat) pseudoprime base 2, but is not Euler pseudoprime base 2.
I hope this helps!
2^((645 - 1)/2) = 2^322
.....................= (2^14)^23
.....................= 259^23
.....................= (259^3)^7 * 259^2
.....................= 259^7 * 259^2
.....................= (259^3)^3
.....................= 259^3
.....................= 259 (mod 645), which is not 1 or -1 mod 645.
However,
2^(645 - 1) = (2^322)^2
................= 259^2
................= 1 (mod 645).
Hence, 645 is (Fermat) pseudoprime base 2, but is not Euler pseudoprime base 2.
I hope this helps!