%I #16 Sep 25 2018 20:51:42
%S 0,0,0,0,0,0,0,0,0,0,1,0,1,2,3,4,5,6,7,8,2,1,0,1,2,3,4,5,6,7,3,2,1,0,
%T 1,2,3,4,5,6,4,3,2,1,0,1,2,3,4,5,5,4,3,2,1,0,1,2,3,4,6,5,4,3,2,1,0,1,
%U 2,3,7,6,5,4,3,2,1,0,1,2,8,7,6,5,4,3,2,1,0,1,9,8,7,6,5,4,3,2,1,0,11,11,22
%N a(n) = A151949(n)/9.
%H Seiichi Manyama, <a href="/A151950/b151950.txt">Table of n, a(n) for n = 0..10000</a> (terms 0..1000 from Joseph Myers)
%H <a href="/index/K#Kaprekar_map">Index entries for the Kaprekar map</a>
%o (PARI) a(n) = my(d=digits(n)); (fromdigits(vecsort(d,,4)) - fromdigits(vecsort(d)))/9; \\ _Michel Marcus_, Sep 25 2018
%Y In other bases: A164884 (base 2), A164994 (base 3), A165013 (base 4), A165033 (base 5), A165052 (base 6), A165072 (base 7), A165091 (base 8), A165111 (base 9). [From _Joseph Myers_, Sep 05 2009]
%K nonn,base,look
%O 0,14
%A _N. J. A. Sloane_, Aug 18 2009
%E Extended by _Joseph Myers_, Aug 28 2009