login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A193582
Persistence of n for sort-and-subtract (A193581).
4
0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 3, 3, 2, 2, 2, 2, 2, 1, 1, 1, 3, 3, 3, 2, 2, 2
OFFSET
0,11
COMMENTS
Number of sort-and-subtract steps to reach 0 when starting with n.
LINKS
PROG
(Haskell)
a193582 n = length $ takeWhile (> 0) $ iterate a193581 n
a193582_list = map a193582 [0..]
CROSSREFS
Cf. A004185.
Sequence in context: A326307 A343639 A095827 * A091887 A144871 A066799
KEYWORD
nonn,base
AUTHOR
Reinhard Zumkeller, Aug 10 2011
STATUS
approved