OFFSET
1,2
COMMENTS
Start with a(1) = 1.
Describe a(1): 11 (one "1").
Add a(1) to its description to obtain a(2):
a(2) = 1 + 11 = 12.
Describe a(2): 1112.
Add a(2) to its description to obtain a(3):
a(3) = 12 + 1112 = 1124.
Describe a(3): 211214.
Add a(3) to its description to obtain a(4):
a(4) = 1124 + 211214 = 212338.
Describe a(4): 11222318.
Add a(4) to its description to obtain a(5):
a(5) = 212338 + 11222318 = 11434656.
PROG
(Perl) -Mbigint -wle '$n=$a=1; while (1) { print "$n: $a"; ++$n; $a = desc($a) + $a } sub desc { my %a; ++$a{$_} for split //, shift; join "", map +($a{$_}, $_), sort { $a <=> $b } keys %a }'
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Eric Angelini and Hugo van der Sanden, Aug 19 2005
STATUS
approved