OFFSET
1,2
COMMENTS
EXAMPLE
15 is written 1111 base 2 and (-2)^3 + (-2)^2 + (-2)^1 +(-2)^0 = -8 + 4 - 2 + 1 = -5, 15 is divisible by -5.
PROG
(PARI) is(k) = k%fromdigits(binary(k), -2) == 0; \\ Jinyuan Wang, Jan 15 2020
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Alon Ran, Jan 12 2020
STATUS
approved