I figure I'd let you all get a go at another math riddle :) Let's see if you can figure out the pattern and then guess the next three numbers. The first person to successfully post the next three numbers of the pattern will receive $5 PayPal :)

1, 11, 21, 1211, ...

Okay, well maybe that was one number too many ;) I'm letting you guys have it too easy!

Recommended Answers

All 23 Replies

I think it is 111221, 312211, 13112221,

1221, 1311, 1321,

3211, 1232, 4422

Two questions is anyone right and do you mean sets of numbers or 1 number by itself?

What I mean is ... your guess was correct magic :) Congrats! Care to explain the solution to the confused masses?

Ok you start with 1 then the next set tells you that there was one ones(11) and the next tells you two ones(21) and then there is two ones and one one (1211) ect. there will never be a four in this pattern.

Oooh not quite magic ... if you work it out looooong enough you'll encounter 4s, and 5s, etc ... ;) Oh, I misunderstood - there will never be a 4 in the sequence of the 3 next numbers I asked for :)

Never mind this post i misuderstood your misuderstanding.

You said you'll never encounter a 4 in the pattern. But that's not true ... if you work it out long enough you eventually will encounter a sequence of the same number four times in a row. Then, the next row would include a 4 in it.

Really how many sets? I was pretty sure its impossible.

1

This is one 1, so 11
11

This is two 1's so 21
21

This is one 2 and one 1
1211

This is one 2 and three 1s - or - one 1 one 2 two 1s
1231 ---- or ---- 111221

This is one 3 one 2 two 1s -- or - - three 1s two 2s one 1
131221 ----- or ----- 312211

This is one 3 two 2s three 1s -- or -- one 3, one 1, two 2s, two 1s
132231 ------ or ------ 13112221


So this problem is ambiguous to me. I see two possible solutions.

1231, 131221, and 132231

--or--

111221, 312211, 13112221

Ooops.. you guys already solved this.... but I have two solutions. : ) and explanation. Congrats magic27

Of interesting note, my first solution is upper bounded by numbers within 20 digits. The second accepted solution is not bounded; it can described by a nasty recursive function ;-).


Ed

1
11
21
1211
111221
312211
13112221
1113213211
31131211131221
1311211311123113112211
1113211221133112132113212221
311312212221232112111312211312113211
1321131122113211121312211231131122211111221131221

Are you sure you can get a four beacuse you can have one one making 11 then there could be one two three and that would be 1112 and there could be no more?

I was pretty sure that you eventually get to 4. But if you extend it one line more than you have, you'll see there are 5 1s :)

ooops sorry i think i messed up i think that last line was 13211311211132111213122112311311212113111221131221

I'm confused too.

I figure I'd let you all get a go at another math riddle :) Let's see if you can figure out the pattern and then guess the next three numbers. The first person to successfully post the next three numbers of the pattern will receive $5 PayPal :)

1, 11, 21, 1211, ...

Okay, well maybe that was one number too many ;) I'm letting you guys have it too easy!

1, 11,21, 1211, 111221, 312211, 13112221, 1113213211

Describe the previous number...
1
one one
two ones
one two, one one
one one, one two, two ones
three ones, two twos, one one
one three, one one, two twos, two ones,etc.
Final number describes the previous number

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.