%I #16 Sep 25 2018 08:26:04
%S 0,1,2,1,4,5,2,5,8,1,4,5,4,13,14,5,14,17,2,5,8,5,14,17,8,17,26,1,4,5,
%T 4,13,14,5,14,17,4,13,14,13,40,41,14,41,44,5,14,17,14,41,44,17,44,53,
%U 2,5,8,5,14,17,8,17,26,5,14,17,14,41,44,17,44,53,8,17,26,17,44,53,26,53,80
%N Write n in ternary, sort digits into increasing order.
%H Seiichi Manyama, <a href="/A038574/b038574.txt">Table of n, a(n) for n = 0..10000</a>
%H Michael Gilleland, <a href="/selfsimilar.html">Some Self-Similar Integer Sequences</a>
%H Robert Walker, <a href="http://robertinventor.com/ftswiki/Self_Similar_Sloth_Canon_Number_Sequences">Self Similar Sloth Canon Number Sequences</a>
%e 15 = 120 -> 012 = 5, so a(15)=5.
%t Table[FromDigits[Sort[IntegerDigits[n,3]],3],{n,0,90}] (* _Harvey P. Dale_, Dec 08 2015 *)
%Y Cf. A038573, A004185.
%K nonn,base,easy
%O 0,3
%A _N. J. A. Sloane_
%E More terms from _Erich Friedman_.