From: XXXakoro@hotpop.comXXX (Andres Koropecki) Subject: Re: Powers of Two Date: 3 Aug 2000 00:32:04 -0400 Newsgroups: sci.math Summary: [missing] On Sat, 29 Jul 2000 17:09:06 GMT, Russell Harper wrote: >FYI, I ran all powers of two from 1 to 1000 for bases b, 2 to 36, >and came up with the following pairs, p & q: >(i.e. 2^5 base 3 has the same digits as 2^6 base 3) >b p q (...) >5 3 4 >9 4 6 >17 5 8 >33 6 10 >There seems to be a pattern for all bases b = 2^n + 1, n > 1. >Russell The expression in base 2^n+1 of the numbers 2^(n+1) and 2^(2n) are two rearrangements of the same digits. In fact 2^(n+1) has the two digit representation (1, 2^n-1) = 1*(2^n+1) + (2^n - 1)*1, while 2^(2n) is represented by (2^n-1, 1) = (2^n-1)*(2^n+1) + 1*1. What about other bases? Andres ============================================================================== From: "Clive Tooth" Subject: Re: Powers of three Date: Wed, 2 Aug 2000 16:09:43 +0100 Newsgroups: sci.math Russell Harper wrote... >David G Radcliffe wrote in message >news:8m1vsr$fpp$1@uwm.edu... >> As a followup to Paul Harvey's question about powers of two, >> does there exist a power of three whose digits can be permuted >> to give a different power of three? >... > >I did a quick test, there's nothing under 3^2000 in base 10. While it >doesn't prove there aren't any, the chances are less likely as the >exponents get larger. However, the digits in 3^28 can be permuted to the >digits in 3^29 in base four. Some similar results: Base Same digits ---- ----------- 3: 2^6 2^5 3: 2^28 2^27 3: 2^41 2^40 3: 2^93 2^92 3: 2^139 2^138 5: 2^4 2^3 9: 2^6 2^4 17: 2^8 2^5 33: 2^10 2^6 65: 2^12 2^7 129: 2^14 2^8 4: 3^29 3^28 9: 4^3 4^2 33: 4^5 4^3 129: 4^7 4^4 33: 12^4 12^3 197: 21^3 21^2 -- Clive Tooth http://www.pisquaredoversix.force9.co.uk/ End of document ============================================================================== From: Russell Harper Subject: Re: Powers of three Date: Wed, 02 Aug 2000 16:49:06 -0400 Newsgroups: sci.math See below... Clive Tooth wrote: > Russell Harper wrote... > > >David G Radcliffe wrote in message > >news:8m1vsr$fpp$1@uwm.edu... > >> As a followup to Paul Harvey's question about powers of two, > >> does there exist a power of three whose digits can be permuted > >> to give a different power of three? > >... > > > >I did a quick test, there's nothing under 3^2000 in base 10. While it > >doesn't prove there aren't any, the chances are less likely as the > >exponents get larger. However, the digits in 3^28 can be permuted to the > >digits in 3^29 in base four. > > Some similar results: > > Base Same digits > ---- ----------- > > 3: 2^6 2^5 > 3: 2^28 2^27 > 3: 2^41 2^40 > 3: 2^93 2^92 > 3: 2^139 2^138 As well: 3: 2^930 2^929 3: 2^1087 2^1086 It (i.e. 5, 27, 40, 92, ...) has been entered as sequence A056154 in the On-Line Encyclopedia of Integer Sequences. I'm currently running some code that's checking higher powers of two. > > 5: 2^4 2^3 > 9: 2^6 2^4 > 17: 2^8 2^5 > 33: 2^10 2^6 > 65: 2^12 2^7 > 129: 2^14 2^8 I'll call these "trivial cases": for n > 1, the digits in 2^(2n) permute to the digits in 2^(n+1) when represented in base (2^n)+1. > > > > 9: 4^3 4^2 > 33: 4^5 4^3 > 129: 4^7 4^4 Related to the "trivial cases" for powers of two? Might see the same pattern with powers of 16. > > 4: 3^29 3^28 > > 33: 12^4 12^3 > > 197: 21^3 21^2 And then there are these little "nuggets" stuck out in the middle of nowhere. Currently, the most interesting for me are base three representations of powers of two... Russell ============================================================================== From: Chas F Brown Subject: Re: Powers of three Date: Mon, 07 Aug 2000 15:26:17 -0700 Newsgroups: sci.math Russell Harper wrote: [first lines of previous article were quoted --djr] > It (i.e. 5, 27, 40, 92, ...) has been entered as sequence > A056154 in the On-Line Encyclopedia of Integer Sequences. > I'm currently running some code that's checking higher > powers of two. (In the category of total wastes of computer time ;), I found no other examples (base 3) up to 2^(73000). Cheers - Chas --------------------------------------------------- C Brown Systems Designs Multimedia Environments for Museums and Theme Parks --------------------------------------------------- ============================================================================== From: "Russell Harper" Subject: Re: Powers of three Date: Wed, 9 Aug 2000 08:14:30 -0400 Newsgroups: sci.math Chas F Brown wrote in message news:39908383.9BA83EC4@cbrownsystems.com... ... > I actually wrote mine in Lingo - that's the scripting language used for > Macromedia's Director (the multimedia application used to create > Shockwave Web content - amongst other things). The newest generation of > Pentiums (PIII, 650MHz) are just too damn fast - Lingo is hardly what > I'd call an "optimized" language for mathematics; but I just let it run > overnight. Then I had to go to work, so I stopped! > > There's no "long-long-LONG" integer support, so I just implemented it as > an array of elements mod 3, and multiplied it out "by hand" so to speak. > I.e., X = {x[i]}; so to find 2*X, loop over {z = 2*x[i] + carry; x[i] = > z mod 3; carry = (z - (z mod 3))/3;}. Add into that loop a total count > of how many times x[i] is 0, 1, and 2, respectively; (i.e. > newDigitTotals[x[i]]++;) and you can compare X and 2*X to see if they > have the same digit totals - in which case they are permutations. (This > may be why my algorithm is running a bit faster than yours - I generate > the product and the "digit count" at the same time). > > With a little tweakage to the above algorithm, you can use this approach > for any x^n base b. ... I was going to write an elegant set of C++ classes using precalculated tables and packing as many digits in each integer, but then I thought, what for? So I wrote a quick solution in C inspired by what you did. For those interested, the next powers of two such that the digits are permutable when written in base three are: 2^352664 and 2^352665 The exponents are getting so large that even they are hard to remember! I'm still looking for a smarter solution - i.e. not through brute force! Russell