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
Originally posted by iamatigercan anyone go one step further can give entry 11?
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
Originally posted by sloppybOr more succinctly, the answer to this series is that entry n is a description of n-1.
can anyone go one step further can give entry 11?
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.
Originally posted by sloppybJust edit the 10 in the first line of the script to 20 or whatever:
can anyone go one step further can give entry 11?
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?