login
Sort-and-subtract: a(n) = n - A004185(n).
6

%I #18 Oct 22 2024 03:27:42

%S 0,0,0,0,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,18,9,0,0,0,0,0,0,0,0,27,18,9,

%T 0,0,0,0,0,0,0,36,27,18,9,0,0,0,0,0,0,45,36,27,18,9,0,0,0,0,0,54,45,

%U 36,27,18,9,0,0,0,0,63,54,45,36,27,18,9,0,0

%N Sort-and-subtract: a(n) = n - A004185(n).

%H Reinhard Zumkeller, <a href="/A193581/b193581.txt">Table of n, a(n) for n = 0..10000</a>

%F a(A009994(n)) = 0.

%F For n > 10, a(A009995(n)) > 0.

%t ss[n_]:=n-FromDigits[Sort[Select[IntegerDigits[n],#>0&]]]; Array[ss,80,0] (* _Harvey P. Dale_, Aug 13 2013 *)

%o (Haskell)

%o a193581 n = n - a004185 n

%o a193581_list = map a193581 [0..]

%Y Cf. A009994, A004185, A065641.

%K nonn,base,look,easy

%O 0,11

%A _Reinhard Zumkeller_, Aug 10 2011