Go back
What Comes Next?

What Comes Next?

Posers and Puzzles

Vote Up
Vote Down

What row of numbers comes next in this series?


1
11
21
1211
111221
312211
13112221

Vote Up
Vote Down

if you want more puzzles ask me

Vote Up
Vote Down

Nice 🙂
1113213211

Vote Up
Vote Down

Followed by 31131211131221

Vote Up
Vote Down

Originally posted by SJPinder
Nice 🙂
1113213211
very good. want more?????????

Vote Up
Vote Down

go for it, sloppy, post them all.

Vote Up
Vote Down

This perl script outputs the first 10:

my ($num,$last) = (1,10);
for (my $n=1; $n<=$last; $n++) {
print "entry $n is $num \n";
my ($newnum, $lastchar, $count) = ('','',1);
foreach my $char (split //, $num) {
($lastchar = $char, next) unless $lastchar;
($count++, next) if $char eq $lastchar;
$newnum .= $count.$lastchar;
$lastchar = $char;
$count = 1;
}
$num = $newnum.$count.$lastchar;
}

That gives:

entry 1 is 1
entry 2 is 11
entry 3 is 21
entry 4 is 1211
entry 5 is 111221
entry 6 is 312211
entry 7 is 13112221
entry 8 is 1113213211
entry 9 is 31131211131221
entry 10 is 13211311123113112211

Vote Up
Vote Down

Originally posted by iamatiger
This perl script outputs the first 10:

my ($num,$last) = (1,10);
for (my $n=1; $n<=$last; $n++) {
print "entry $n is $num \n";
my ($newnum, $lastchar, $count) = ('','',1);
foreach my $char (split //, $num) {
($lastchar = $char, next) unless $lastchar;
($count++, next) if $char eq $lastchar;
...[text shortened]... 12221
entry 8 is 1113213211
entry 9 is 31131211131221
entry 10 is 13211311123113112211
can anyone go one step further can give entry 11?

Vote Up
Vote Down

Originally posted by sloppyb
can anyone go one step further can give entry 11?
Or more succinctly, the answer to this series is that entry n is a description of n-1.

in the form <x><a><y><b>...

where <x> is the number of consecutive characters <a>
and <y> is the number of consecutive characters <b>
etc.

5 edits
Vote Up
Vote Down

Originally posted by sloppyb
can anyone go one step further can give entry 11?
Just edit the 10 in the first line of the script to 20 or whatever:

entry 11 is 11131221133112132113212221
entry 12 is 3113112221232112111312211312113211
entry 13 is 1321132132111213122112311311222113111221131221
entry 14 is
11131221131211131231121113112221121321132132211331222113112211
entry 15 is
3113112221131112311311121321123113213221121113122113121113222123113221
13212221
entry 16 is
1321132132211331121321133112111312211213211312111322211231131122211311
12311332111213211322211312113211
entry 17 is
1113122113121113222123211211131221232112311311222112111312211311123113
3221121321132132211331121321231231121113122113322113111221131221
entry 18 is
3113112221131112311332111213122112311311221112131221121321132132211231
1311222113311213212322211211131221131211132221232112111312111213111213
211231131122212322211331222113112211
entry 19 is
1321132132211331121321231231121113112221121321132122311211131122211211
1312211312111322211213211321322123211211131211121332211231131122211311
1231133211121312211231131112311211133112111312211213211321321112133221
2311322113212221
entry 20 is
1113122113121113222123211211131211121311121321123113213221121113122113
1211221321123113213221123113112221131112311332211211131221131211132211
1213122112311311123112112322211213211321322113311213212312311211131122
2112132113311213211231232112311311222112111312211312111312311211232211
1213211322211312113211

Notice the repeating patterns that start up in the first and last digits?