Or you can do it as a rewriting system: 00 -> e 11 -> e 1010 -> 01 0101 -> 10 In prose, strike out identical pairs, and strike out the two digits on the end of abab patterns; repeat until you end with e (a multiple of 3) or 1 or 10 (not a power of 3). On Tue, May 24, 2016 at 11:04 AM, Victor Miller <victorsmiller@gmail.com> wrote:
Dan, Sure. Use the fact that 2^2 = 1 mod 3, so you "cast out 3's" -- take pairs of digits in binary, and add them up, and repeat the process as long as you have more than 2 bits.
For example 27 = 11011, so 11011 --> 1 + 10 + 11 = 110 --> 1 + 10 = 11, which is 3.
Victor
On Tue, May 24, 2016 at 1:52 PM, Dan Asimov <dasimov@earthlink.net> wrote:
Zak, good question: Is there a quick way to detect multiples of 3 expressed in base 2 ??? Let's see:
(2 + 1) (2^a + 2^b + ... + 2^c) =
2^(a+1) + 2^a + 2^(b+1) + 2^b + ... + 2^(c+1) + 2^c.
Hmm, if all these exponents are distinct, this pattern seems very easy to detect.
But what if some of the exponents are equal?
I bet there's a simple algorithm to untangle them.
But I may be wrong.
—Dan
On May 24, 2016, at 9:56 AM, Zak Seidov via math-fun < math-fun@mailman.xmission.com> wrote:
Also, in our native, base - 10, numbers divisible by 3 has sum of digits also divisible by 3, while base - 2 has nothing similar.
_______________________________________________ math-fun mailing list math-fun@mailman.xmission.com https://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
_______________________________________________ math-fun mailing list math-fun@mailman.xmission.com https://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
-- -- http://cube20.org/ -- [ <http://golly.sf.net/>Golly link suppressed; ask me why] --