Just for the fun of it

Started by newdep, December 26, 2006, 05:07:46 AM

Previous topic - Next topic

newdep

Just for the fun of it, I ran into it again and its still a funny puzzle..

(a nice one to make in newlisp btw !)



The puzzle is: What is the next number in the following sequence:



1 11 21 1211 111221 312211 13112221





PS: For those who know the answer, dont post the number after 13112221

but post the number after that one ;-)
-- (define? (Cornflakes))

Sammo

#1
Shouldn't the sequence be this?
> 1
1
> (next 1)
"11"
> (next (next 1))
"21"
> (next (next (next 1)))
"1211"
> (next (next (next (next 1))))
"1231"
> (next (next (next (next (next 1)))))
"131221"
> (next (next (next (next (next (next 1))))))
"132231"
> (next (next (next (next (next (next (next 1)))))))
"232221"
> (next (next (next (next (next (next (next (next 1))))))))
"134211"
> (next (next (next (next (next (next (next (next (next 1)))))))))
"14131231"


[Edit: Sorry, I was thinking of a different sequence.]

Sammo

#2
This is more like it:
> "1"
"1"
> (next "1")
"11"
> (next (next "1"))
"21"
> (next (next (next "1")))
"1211"
> (next (next (next (next "1"))))
"111221"
> (next (next (next (next (next "1")))))
"312211"
> (next (next (next (next (next (next "1"))))))
"13112221"
> ;...

> (next (next (next (next (next (next (next (next "1"))))))))
"31131211131221"

newdep

#3
thats intresting.... though im losing track after the 3th nested list ;-)



When i saw the puzzle i was directly thinking of your Roman-Number

script "http://www.newlisp.org/syntax.cgi?code/roman.lsp.txt">http://www.newlisp.org/syntax.cgi?code/roman.lsp.txt".



Your solution is correct, thought only in your second answer  ;-)

31131211131221 is the 9th sequence..



Your first answer does produce an intresting  sequence, cant figure out

yet what it could be ;-)



Regards, Norman.
-- (define? (Cornflakes))