My version of an isEven function using Goldbach's conjecture and the laws of arithmetic on even and odd integers
Checks for even using Goldbach's conjecture, which states that every even integer greater than 2 can be expressed as the sum of two primes.
Also uses the laws of addition and subtraction on even and odd numbers:
- even ± even = even
- even ± odd = odd
- odd ± odd = even
See Wikipedia page: https://en.wikipedia.org/wiki/Parity_(mathematics)
Disclaimer: numbers in the thousands may start to take a while