The OEIS is supported by the many generous donors to the OEIS Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A151959 Consider the Kaprekar map x->K(x) described in A151949. Sequence gives the smallest number that belongs to a cycle of length n under repeated iteration of this map, or -1 if there is no cycle of length n. 18
 0, 53955, 64308654, 61974, 86420987532 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 COMMENTS No cycle of length 6 is presently known! It is also known that a(7) = 420876, a(8) = 7509843, a(14) = 753098643. From Joseph Myers, Aug 19 2009: (Start) One does not need to consider every integer of n digits, only the sorted sequences of n digits (of which there are binomial(n+9, 9), so 28048800 for 23 digits). Then you only need to consider those sorted sequences of digits whose total is a multiple of 9, as the number and so the sum of its digits is always a multiple of 9 after the first iteration, which reduces the work by a further factor of about 9. As a further refinement, the result of a single subtraction, if not zero, will have digit sequence of the form d_1 d_2 ... d_k-1 9...9 9-d_k ... 9-d_2 9-d_1+1 where the values d_i are in the range 1 to 9 and the sequence of 9's in the middle may be empty. From this form it follows that for any member of a cycle, abs(number of 8's - number of 1's) + abs(number of 7's - number of 2's) + abs(number of 6's - number of 3's) + abs(number of 5's - number of 4's) + max(0, number of 0's - number of 9's) <= 4, so given the numbers of 0's, 1's, 2's, 3's and 4's there is little freedom left in choosing the number of each remaining digit. No further cycle lengths exist up to at least 140 digits. The only 4-cycles up to there are the ones containing 61974 and 62964, the only 8-cycles up to there are the ones containing 7509843 and 76320987633, the only 14-cycle up to there is the one containing 753098643. All the 7-cycles so far follow the pattern 7-cycle: 420876 7-cycle: 43208766 7-cycle: 4332087666 7-cycle: 433320876666 7-cycle: 43333208766666 7-cycle: 4333332087666666 ... (End) LINKS R. J. Mathar, Maple code for A151949 and A151959 Joseph Myers, List of cycles under Kaprekar map (all numbers with <= 60 digits; cycles are represented by their smallest value) EXAMPLE a(1) = 0: 0 -> 0. a(2) = 53955: 53955 -> 59994 -> 53955 -> ... a(3) = 64308654: 64308654 -> 83208762 -> 86526432 -> 64308654 -> ... a(4) = 61974: 61974 -> 82962 -> 75933 -> 63954 -> 61974 -> ... CROSSREFS A099009 gives the fixed points and A099010 gives numbers in cycles of length > 1. Cf. A151949. In other bases: A153881 (base 2), A165008 (base 3), A165028 (base 4), A165047 (base 5), A165067 (base 6), A165086 (base 7), A165106 (base 8), A165126 (base 9). [Joseph Myers, Sep 05 2009] Sequence in context: A099010 A164723 A164720 * A164724 A190472 A038564 Adjacent sequences:  A151956 A151957 A151958 * A151960 A151961 A151962 KEYWORD nonn,more,base AUTHOR Klaus Brockhaus and N. J. A. Sloane, Aug 19 2009 EXTENSIONS The term a(3) = 64308654 was initially only a conjecture, but was confirmed by Zak Seidov, Aug 19 2009 a(4) = 61974 corrected by R. J. Mathar, Aug 19 2009 (we had not given the smallest member of the 4-cycle). a(4) = 61974, a(7) = 420876, and a(8) = 7509843 confirmed by Zak Seidov, Aug 19 2009 (formerly the a(8) value was just an upper bound) a(5) = 86420987532 and a(14) = 753098643 from Joseph Myers, Aug 19 2009. He also confirms the other values, and remarks that there are no other cycle lengths up to at least 140 digits. STATUS approved

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

Last modified September 26 18:11 EDT 2022. Contains 357002 sequences. (Running on oeis4.)