Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A165012
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A165012 a(n) = image of n under the base-4 Kaprekar map n -> (n with digits sorted into descending order) - (n with digits sorted into ascending order) +0
29
0, 0, 0, 0, 3, 0, 3, 6, 6, 3, 0, 3, 9, 6, 3, 0, 15, 15, 30, 45, 15, 0, 15, 30, 30, 15, 15, 30, 45, 30, 30, 30, 30, 30, 30, 45, 30, 15, 15, 30, 30, 15, 0, 15, 45, 30, 15, 15, 45, 45, 45, 45, 45, 30, 30, 30, 45, 30, 15, 15, 45, 30, 15, 0, 63, 75, 138, 201, 75, 63, 126, 189, 138, 126 (list; graph; listen)
OFFSET

0,5

LINKS

Joseph Myers, Table of n, a(n) for n=0..1024

Index entries for the Kaprekar map

PROGRAM

Contribution from Michael Porter (michael_b_porter(AT)yahoo.com), Nov 05 2009: (Start)

(PARI) cons(m) = {local(b, r); r=0; b=1; for(i=1, matsize(m)[2], r=r+b*m[i]; b=b*4); r}

A165012(n) = {local(m, r); r=[]; m=n; while(m>0, r=concat(m%4, r); m=floor(m/4)); cons(vecsort(r, , 0))-cons(vecsort(r, , 4))} (End)

CROSSREFS

Cf. A165013.

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

Sequence in context: A010599 A038517 A055949 this_sequence A074694 A127803 A021771

Adjacent sequences: A165009 A165010 A165011 this_sequence A165013 A165014 A165015

KEYWORD

base,nonn

AUTHOR

Joseph Myers (jsm(AT)polyomino.org.uk), Sep 04 2009

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified December 4 23:11 EST 2009. Contains 170347 sequences.


AT&T Labs Research