login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo

Thanks to everyone who made a donation during our annual appeal!
To see the list of donors, or make a donation, see the OEIS Foundation home page.

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A165032 a(n) = image of n under the base-5 Kaprekar map n -> (n with digits sorted into descending order) - (n with digits sorted into ascending order) 30

%I

%S 0,0,0,0,0,4,0,4,8,12,8,4,0,4,8,12,8,4,0,4,16,12,8,4,0,24,24,48,72,96,

%T 24,0,24,48,72,48,24,24,48,72,72,48,48,48,72,96,72,72,72,72,48,48,48,

%U 72,96,48,24,24,48,72,48,24,0,24,48,72,48,24,24,48,96,72,48,48,48,72,72,72

%N a(n) = image of n under the base-5 Kaprekar map n -> (n with digits sorted into descending order) - (n with digits sorted into ascending order)

%H Indranil Ghosh, <a href="/A165032/b165032.txt">Table of n, a(n) for n = 0..15625</a> (terms 0..3125 from Joseph Myers)

%H <a href="/index/K#Kaprekar_map">Index entries for the Kaprekar map</a>

%e For n = 10, 10_10 = 20_5. So, a(10) = 20_5 - 2_5 = 10 - 2 = 8. - _Indranil Ghosh_, Feb 02 2017

%t a[n_] := With[{dd = IntegerDigits[n, 5]}, FromDigits[ReverseSort[dd], 5] - FromDigits[Sort[dd], 5]];

%t a /@ Range[0, 100] (* _Jean-Fran├žois Alcover_, Jan 08 2020 *)

%Y Cf. A165033.

%Y In other bases: A164884 (base 2), A164993 (base 3), A165012 (base 4), A165051 (base 6), A165071 (base 7), A165090 (base 8), A165110 (base 9), A151949 (base 10).

%K base,nonn

%O 0,6

%A _Joseph Myers_, Sep 04 2009

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified January 22 16:25 EST 2020. Contains 331152 sequences. (Running on oeis4.)