Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A151967
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A151967 Iterate the Kaprekar map of A151949 starting at the n-digit number 100...01; sequence gives the lowest number in the resulting cycle. +0
5
0, 0, 6174, 62964, 420876, 7509843, 64308654, 864197532, 6431088654, 86420987532, 643310886654, 8643209876532, 43333208766666, 885432098765412, 6543331088666544, 88754320987654212, 643111110888888654 (list; graph; listen)
OFFSET

2,3

LINKS

Joseph Myers, Table of n, a(n) for n=2..1000 [From Joseph Myers (jsm(AT)polyomino.org.uk), Aug 21 2009]

Index entries for the Kaprekar map

EXAMPLE

a(6) = 420876: 100001 -> 109989 -> 980811 -> 976221 -> 853542 -> 620874 -> 851742 -> 750843 -> 840852 -> 860832 -> 862632 -> 642654 -> 420876 -> 851742 -> ..., a cycle of length 7 with smallest member 420876.

MATHEMATICA

(Mma program from Harvey P. Dale) To find the first 20 terms of the trajectory of 10001, for instance:

f[n_]:=Module[{idn=IntegerDigits[n], idns}, idns=Sort[idn]; Abs[FromDigits[ idns]-FromDigits[Reverse[idns]]]]

NestList[f, 10001, 20]

CROSSREFS

See A151968 for the length of the cycles. Cf. A151957, A151958.

Different from A151957.

Sequence in context: A007992 A033288 A057880 this_sequence A114930 A068757 A031836

Adjacent sequences: A151964 A151965 A151966 this_sequence A151968 A151969 A151970

KEYWORD

nonn,base

AUTHOR

N. J. A. Sloane (njas(AT)research.att.com), Aug 20 2009

EXTENSIONS

Extended by Joseph Myers (jsm(AT)polyomino.org.uk), Aug 21 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 10 12:37 EST 2009. Contains 170569 sequences.


AT&T Labs Research