login
This site is supported by donations to The OEIS Foundation.

 

Logo

Please make a donation to keep the OEIS running. We are now in our 55th year. In the past year we added 12000 new sequences and reached 8000 citations (which often say "discovered thanks to the OEIS"). We need to raise money to hire someone to manage submissions, which would reduce the load on our editors and speed up editing.
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A165090 a(n) = image of n under the base-8 Kaprekar map n -> (n with digits sorted into descending order) - (n with digits sorted into ascending order) 31
0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 7, 14, 21, 28, 35, 42, 14, 7, 0, 7, 14, 21, 28, 35, 21, 14, 7, 0, 7, 14, 21, 28, 28, 21, 14, 7, 0, 7, 14, 21, 35, 28, 21, 14, 7, 0, 7, 14, 42, 35, 28, 21, 14, 7, 0, 7, 49, 42, 35, 28, 21, 14, 7, 0, 63, 63, 126, 189, 252, 315, 378, 441, 63, 0, 63, 126, 189 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,9

LINKS

Indranil Ghosh, Table of n, a(n) for n = 0..32768 (terms 0..4096 from Joseph Myers)

Index entries for the Kaprekar map

EXAMPLE

For n = 11, 11_10 = 13_8. So, a(11) = 31_8 - 13_8 = 25 - 11 = 14. - Indranil Ghosh, Feb 02 2017

PROG

(Python)

def A165090(n):

....if n==0:return 0

....return int("".join(sorted(oct(n)[1:], reverse=True)), 8)-int("".join(sorted(oct(n)[1:])), 8) # Indranil Ghosh, Feb 02 2017

CROSSREFS

Cf. A165091.

In other bases: A164884 (base 2), A164993 (base 3), A165012 (base 4), A165032 (base 5), A165051 (base 6), A165071 (base 7), A165110 (base 9), A151949 (base 10).

Sequence in context: A096444 A246918 A055957 * A117013 A176015 A322910

Adjacent sequences:  A165087 A165088 A165089 * A165091 A165092 A165093

KEYWORD

base,nonn

AUTHOR

Joseph Myers, Sep 04 2009

STATUS

approved

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 December 13 17:17 EST 2019. Contains 329970 sequences. (Running on oeis4.)