Specifically for [livejournal.com profile] coldtortuga

Jan. 1st, 2006 01:56 pm
pmb: (Default)
[personal profile] pmb
A variation on a previous theme:
BaseNumberNumber in Base 10
2121
3232
4312454
54135108
64126152
765142716200
8762513482042460
9827153694416720
109867312109867312
Still churning - these O(nn) algorithms really soak up the CPU time...
(I later hit Ctrl-C, so all numbers after this point are from [livejournal.com profile] coldtortuga)
11A98762413112334364200
12B935217612421877610
13CBA95847213131779700673520

Date: 2006-01-09 07:49 pm (UTC)
From: [identity profile] coldtortuga.livejournal.com
Cool! That's a neat generalization :-)

(I'm just now catching up on lj after 2 weeks at my parents' home in Alaska. They only have internet connectivity via the phone line, e.g., "[ring ring ring] Hey Jen, are you near your mom's computer? Could you look up the World Cup groups and read them off to me, pretty pretty please??")

My code spat out the base-eleven answer in a few minutes (A9876241311 = 233436420010) but it's been cranking for a couple hours now on base-twelve. The numbers are big enough to require Python "long" integers, which are waaaaay slower than native-hardware integers; I probably need a thorough re-writing of my generators to avoid so many multiplications and function-calls.

Date: 2006-01-09 09:21 pm (UTC)
From: [identity profile] coldtortuga.livejournal.com
Somewhat disturbingly, my code reports B935217612 = 42187761010 for base-twelve. Hmmmm... [taps teeth]

Date: 2006-01-09 10:44 pm (UTC)
From: [identity profile] pmb.livejournal.com
Makes sense - you can't have a 0 as the final digit, which means that you can't have a multiple of 4 *and* a multiple of 3 in there, so either 4 and 8 are out or 3,6, and 9 are. Which means that you can have at most 9 digits. Why you can't have an A in there, I'm less sure, particularly since it is definitely divisible by A, as it is divisible by both 2 and 5.

Date: 2006-01-09 10:48 pm (UTC)
From: [identity profile] pmb.livejournal.com
(note that the intuition I gave for 12 means that 13 will most likely be some friggin huge number, due to its primeness)

Date: 2006-01-10 02:54 pm (UTC)
From: [identity profile] coldtortuga.livejournal.com
For base thirteen: CBA9584721313 = 177970067352010. Good intuitin' :)

Profile

pmb: (Default)
pmb

October 2009

S M T W T F S
    1 23
45678910
11121314151617
18192021222324
25262728293031

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jan. 17th, 2026 02:21 pm
Powered by Dreamwidth Studios