OFFSET
0,3
COMMENTS
a(n) = A004186(a(n-1) + 1). - Reinhard Zumkeller, Oct 31 2007
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 0..1000
FORMULA
a(n+1) = (d+0^d)*10^floor(log_10(a(n)+1)) + (1-0^d)*floor(a(n)/10), where d = (a(n)+1) mod 10. - Reinhard Zumkeller, Oct 31 2007
a(n) = (ceiling( (n-G(D(n)-1))/D(n) )*(10^D(n) -1) - 10^( (G(D(n)-1)-n) mod (D(n)) ) + 1)/9, for n>0, where D(n) = floor( (sqrt(8n+1)+3)/6 ) is the number of digits in a(n), and G(k) = A027468(k) = 9*k*(k+1)/2. - Stefan Alexandru Avram, May 24 2023
MATHEMATICA
NestList[FromDigits[Sort[IntegerDigits[#+1], Greater]]&, 0, 60] (* Harvey P. Dale, Sep 04 2011 *)
PROG
(Haskell)
a064222 n = a064222_list !! n
a064222_list = iterate (a004186 . (+ 1)) 0
-- Reinhard Zumkeller, Apr 11 2012
CROSSREFS
KEYWORD
AUTHOR
Reinhard Zumkeller, Sep 21 2001
STATUS
approved