How to determine whether a number is even or odd in any base

created by polygnwnd
(idea) by polygnwnd (11.8 mon) (print)   (I like it!) Thu Sep 20 2001 at 18:01:48
An "even" number is divisible by 2 with no remainder. For integer N in integer base B:
If B is even:
One can determine if N is even or odd by looking at the least significant digit of N (B0). If it is odd then N is odd. If it is even, N is even.
If B is odd:
One can tell if N is even or odd by finding the sum of all the digits of N. If the sum is an even number then N is even. If the sum is odd, then N is odd.
Y'know, if you log in, you can write something here, or contact authors directly on the site. Create a New User if you don't already have an account.