pseydtonne: Behold the Operator, speaking into a 1930s headset with its large mouthpiece. (Default)
[personal profile] pseydtonne
I've decided it's time to get a real program written. This will get the virgin-coder stink off me.

Just as it's been too long since I spoke French, I haven't played with math in way too long. The last thing that caught my eye was a couple years ago, after finding the answer to a riddle Robert Morris presented to Cliff Stohl in Cuckoo's Egg:

Provide the next member of this series: 1, 11, 21, 1211, 111221, ...

The answer is 312211. How? Each new element is just a translation of the last element. We started with 1, which we can describe as a single one or one-one. 11. The third element is then two ones, or 21. Fourth is one two and one one.

I was bored one day at Genuity and I figured out the series for several iterations. I came to some simple conclusions:
  1. No matter which numeric digit you make the first element (say, 4 instead of 1), the highest digit beside the prime element's value will be 3;
  2. You get exponential growth in the number of digits in an element with interesting plateaus;
  3. It gets really hard to keep track of what you're doing when you use pen and paper;
  4. Genuity was a silly company with a great music server. The day that server died was the day I decided to look for another job.


I've decided I want to make a program that will spit out finite iterations of this series. At first I'd make the program ask for a starter number (with a default of 1) and then ask for which chunks you want to see in the series. This would prevent a program that doesn't know when to stop. A later version of the program would let you zoom in on sections of one element and see what it came from on the previous element.

I realize this is geek silliness. I'm still fascinated by the series. I want to get a few big stacks and compare changes. What if I use 25 instead of 1? (1215, 11121115, 31123115, 1321132115... notice how the five starts to look like a chaperone?)

Now that I've declared my intentions, I realize I'm also looking at my own documentation. This will be a good undertaking for my brain. Anyone else intrigued?

For the rest of you, it's Friday. Enjoy a warm weekend (which is what Boston is supposed to have coming) and hope my kitty won't try to steal your seat. I get up to ditch my drink and come back to find Nisa totally hogging my seat for its heat.

Date: 2004-02-27 07:20 am (UTC)
From: [identity profile] metahacker.livejournal.com
If you need help, drop a line. I used to do exactly this sort of thing all the time, including filling my screen with exponents of 7 in various clock arithmatics to see if i could make out any patterns...This is a bit more complicated than that, but doable if you do some basic string parsing (I doubt you want to store the list of digits as a number).

Anyway, if you want to write it in Java, that's all good; you could write it more simply in C, but Java's hipper anyway.

Date: 2004-02-27 07:53 am (UTC)
From: [identity profile] pseydtonne.livejournal.com
Oh, this is going to be in C. Once I feel comfy with C and how to do things in it, I'll deal with the Java kids and their process of roasting.

Date: 2004-02-27 08:29 am (UTC)
From: [identity profile] metahacker.livejournal.com
I guess. For this sort of program -- assuming you only want text output -- the difference is really only in the three lines of incantation at the beginning of your program; the heart could be the same, or could be simplified by using Java's string libraries...

If you don't know either, though, I'd recommend learning Java first; it teaches you good habits, rather than letting you stray into the bad part of town. But it sounds like you have some fractional C experience.

Date: 2004-02-27 12:54 pm (UTC)
From: [identity profile] tkitch.livejournal.com
ok, yer entirely on crack....

know that? seriously....

Date: 2004-02-28 12:38 pm (UTC)
From: [identity profile] chaggalagirl.livejournal.com
i can vouch wholeheartedly. he's nuts. he tried explaining this to me but i wouldn't let him. it would have frustrated me out to all hell and i would have gotten upset and cried.

but yes, he's totally on crack.

August 2016

S M T W T F S
 123456
78910111213
1415 1617181920
21222324252627
28293031   

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Feb. 5th, 2026 10:27 am
Powered by Dreamwidth Studios