Hacker News new | ask | show | jobs
by kazinator 3937 days ago
You're right in that evenness is divisibility by two by definition. For any P which is prime, P is the smallest divisible by P.

It is probably that divisibility by two (evenness) is interesting.

For example, it has the property that if we know the evenness of two integers, then we know the evenness of their sum or product.

Division of cases by even versus odd occurs regularly; in few circumstances do you have to separately reason about cases corresponding somehow to the elements of the congruence modulo 37.

1 comments

As regards your third line, I feel compelled to note that if we know the equivalence class of two integers (mod 37), we also know the equivalence class (mod 37) of their sum and product. ;)
Indeed, it just the mod 37 congruence doesn't correspond to nice Boolean:

  odd(x + y) = odd(x) XOR odd(y)
  odd(x * y) = odd(x) AND odd(y)
There.