(Haskell)
a006751 = foldl1 (\v d -> 10 * v + d) . map toInteger . a088203_row
(Perl)
# This outputs the first n elements of the sequence, where n is given on the command line.
$s = 2;
for (2..shift @ARGV) {
print "$s, ";
$s =~ s/(.)\1*/(length $&).$1/eg;
}
print "$s\n";
## Arne 'Timwi' Heizmann (timwi(AT)gmx.net), Mar 12 2008
(Python)
l=[2]
n=s=1
y=''
while n<21:
x=str(l[n - 1]) + ' '
for i in range(len(x) - 1):
if x[i]==x[i + 1]: s+=1
else:
y+=str(s)+str(x[i])
s=1
x=''
n+=1
l.append(int(y))
y=''
s=1
(Python)
from functools import cache
from itertools import groupby
def LS(n): return int(''.join(str(len(list(g)))+k for k, g in groupby(str(n))))
@cache
def a(n): return 2 if n == 1 else LS(a(n-1))