Page 1 of 1
next secuence of number ...
Posted: Wed Jun 20, 2007 8:35 pm
by fachamix
TELL ME THE NEXT SECUENCE OF NUMBERS
please write the answer in
WHITE COLOR, so another reader can read the post without watching the answer (unintentionaly meaning
)
1
11
21
1211
111221
312211
13112221
1113213211
31131211131221
Posted: Wed Jun 20, 2007 9:05 pm
by jhawthorn
White does nothing to us using one of the MTdark themes.
1
11
21
1211
111221
312211
13112221
1113213211
31131211131221
13211311123113112211
11131221133112132113212221
3113112221232112111312211312113211
1321132132111213122112311311222113111221131221
11131221131211131231121113112221121321132132211331222113112211
311311222113111231131112132112311321322112111312211312111322212311322113212221
132113213221133112132113311211131221121321131211132221123113112221131112311332111213211322211312113211
11131221131211132221232112111312212321123113112221121113122113111231133221121321132132211331121321231231121113122113322113111221131221
31131122211311123113321112131221123113112211121312211213211321322112311311222113311213212322211211131221131211132221232112111312111213111213211231131122212322211331222113112211
1321132132211331121321231231121113112221121321132122311211131122211211131221131211132221121321132132212321121113121112133221123113112221131112311332111213122112311311123112111331121113122112132113213211121332212311322113212221
11131221131211132221232112111312111213111213211231132132211211131221131211221321123113213221123113112221131112311332211211131221131211132211121312211231131112311211232221121321132132211331121321231231121113112221121321133112132112312321123113112221121113122113121113123112112322111213211322211312113211
311311222113111231133211121312211231131112311211133112111312211213211312111322211231131122211311122122111312211213211312111322211213211321322113311213212322211231131122211311123113223112111311222112132113311213211221121332211211131221131211132221232112111312111213111213211231132132211211131221232112111312211213111213122112132113213221123113112221131112311311121321122112132231121113122113322113111221131221
I cheated a little... This goes on for several megabytes.
EDIT: You've posted this already:
here. Now I don't feel so cool for replying. What was the point of a repost?
Posted: Thu Jun 21, 2007 12:41 am
by os64dev
EDIT: You've posted this already: here. Now I don't feel so cool for replying. What was the point of a repost?
Problably to feel important
Posted: Sun Jun 24, 2007 2:32 pm
by GLneo
i understand the sequence but could someone give me a hint on how to make a program ( in c ) to solve the next line to the n'th place?
thx!
Posted: Mon Jun 25, 2007 3:29 am
by Combuster
...use strings rather than numbers?
....
Posted: Thu Jun 28, 2007 4:48 pm
by fachamix
u have to use string instead of numbers ( or at least you yould treat the sequence as that)
is not hard to do it, you have to print "WHAT YOU SEE"
Posted: Fri Jun 29, 2007 12:17 am
by AndrewAPrice
Even on the default theme, by monitor makes a clear distinction between the background and the white text.
Posted: Fri Jun 29, 2007 12:54 am
by nick8325
Exactly, use a string and just count the number of consecutive repeated characters.
Here's a program in Haskell that generates the sequence, FWIW:
Code: Select all
import Data.List
next = concat . map writeOut . group
where writeOut xs = show (length xs) ++ [head xs]
allSequence = iterate next "1"
allSequence is the whole sequence (an infinite list).
Posted: Fri Jun 29, 2007 8:47 am
by Colonel Kernel
Haskell syntax has always bothered me intensely... What good is it for a language to be that concise if the code is just about write-only?
..
Posted: Mon Jul 02, 2007 9:28 am
by fachamix
i agree with you Colonel Kernel
Posted: Mon Jul 02, 2007 9:56 am
by nick8325
I find Haskell quite easy to read...it did take me a while to get used to, though.
Posted: Mon Jul 02, 2007 10:40 am
by Combuster
It has probably to do with the fact that Haskell employs a totally different programming paradigm. If you have only done object-oriented programming then the workings of an haskell program is indeed like a big bloat of abracadabra.
From the people I've seen, it takes about three weeks to get an understanding of what is actually happening.
Posted: Mon Jul 02, 2007 10:54 am
by Colonel Kernel
Combuster wrote:It has probably to do with the fact that Haskell employs a totally different programming paradigm. If you have only done object-oriented programming then the workings of an haskell program is indeed like a big bloat of abracadabra.
From the people I've seen, it takes about three weeks to get an understanding of what is actually happening.
No, that's not it. I'm quite comfortable with functional programming. I think Haskell has exactly the opposite problem that Lisp has -- instead of too many parentheses, Haskell doesn't have nearly enough.