All off topic discussions go here. Everything from the funny thing your cat did to your favorite tv shows. Non-programming computer questions are ok too.
fachamix
Posts: 21 Joined: Thu Oct 26, 2006 9:30 pm
Post
by fachamix » Wed Jun 20, 2007 8:35 pm
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
jhawthorn
Member
Posts: 58 Joined: Sun Nov 26, 2006 4:06 pm
Location: Victoria, BC, Canada
Contact:
Post
by jhawthorn » Wed Jun 20, 2007 9:05 pm
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?
os64dev
Member
Posts: 553 Joined: Sat Jan 27, 2007 3:21 pm
Location: Best, Netherlands
Post
by os64dev » Thu Jun 21, 2007 12:41 am
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
GLneo
Member
Posts: 237 Joined: Wed Dec 20, 2006 7:56 pm
Post
by GLneo » Sun Jun 24, 2007 2:32 pm
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!
Combuster
Member
Posts: 9301 Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:
Post
by Combuster » Mon Jun 25, 2007 3:29 am
...use strings rather than numbers?
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[
My OS ] [
VDisk/SFS ]
fachamix
Posts: 21 Joined: Thu Oct 26, 2006 9:30 pm
Post
by fachamix » Thu Jun 28, 2007 4:48 pm
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"
AndrewAPrice
Member
Posts: 2311 Joined: Mon Jun 05, 2006 11:00 pm
Location: USA (and Australia)
Post
by AndrewAPrice » Fri Jun 29, 2007 12:17 am
Even on the default theme, by monitor makes a clear distinction between the background and the white text.
nick8325
Member
Posts: 200 Joined: Wed Oct 18, 2006 5:49 am
Post
by nick8325 » Fri Jun 29, 2007 12:54 am
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).
Colonel Kernel
Member
Posts: 1437 Joined: Tue Oct 17, 2006 6:06 pm
Location: Vancouver, BC, Canada
Contact:
Post
by Colonel Kernel » Fri Jun 29, 2007 8:47 am
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?
Top three reasons why my OS project died:
Too much overtime at work Got married My brain got stuck in an infinite loop while trying to design the memory manager
Don't let this happen to you!
fachamix
Posts: 21 Joined: Thu Oct 26, 2006 9:30 pm
Post
by fachamix » Mon Jul 02, 2007 9:28 am
i agree with you Colonel Kernel
nick8325
Member
Posts: 200 Joined: Wed Oct 18, 2006 5:49 am
Post
by nick8325 » Mon Jul 02, 2007 9:56 am
I find Haskell quite easy to read...it did take me a while to get used to, though.
Combuster
Member
Posts: 9301 Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:
Post
by Combuster » Mon Jul 02, 2007 10:40 am
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.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[
My OS ] [
VDisk/SFS ]
Colonel Kernel
Member
Posts: 1437 Joined: Tue Oct 17, 2006 6:06 pm
Location: Vancouver, BC, Canada
Contact:
Post
by Colonel Kernel » Mon Jul 02, 2007 10:54 am
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.
Top three reasons why my OS project died:
Too much overtime at work Got married My brain got stuck in an infinite loop while trying to design the memory manager
Don't let this happen to you!