Describe and add

Eric Angelini keynews.tv at skynet.be
Fri Aug 19 16:06:08 CEST 2005


Thanks so much, Hugo
I'll add this to the OEIS with both yr name
and Perl pgm.
Best,
E.
------------------------
(...)
> Here's some perl code:
> 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 }'

> Compute:
> 1: 1
> 2: 12
> 3: 1124
> 4: 212338
> 5: 11434656
> 6: 2124676182
> 7: 215338937900
> 8: 2011338654109729
> 9: 20314234480170281558
> 10: 20317265802504533296
> 11: 50431498946030705115
> 12: 50834622289546876944
> 13: 50937835732083050773
> 14: 50937875857418523592
> 15: 51038998088873897421
> 16: 51241110320289174260
> 17: 81755323561805346079
> 18: 101966556706331618898
> 19: 101968597938887792727
> 20: 102070720070404367576
> [...]
> 25000: 209208887438850939711053
> [...]
> 1718184: 18417097587111721307162018
>
> :Questions:
> :
> :- has this seq. a fixed point (or loop)?
> :- what about other beginnings?
> :(start with a(1) = 0 for instance)
>
> No: a(n+1) > a(n) is guaranteed by the definition.
>
> See references to "self-describing" in OEIS for some sequences defined
> along similar lines.
>
> Hugo
>
> _______________________________________________
> math-fun mailing list
> math-fun at mailman.xmission.com
> http://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
>







More information about the SeqFan mailing list