Hello MathFun,

[hope no mistakes here, calculated by hand -- and a first warm thank you to Michael Kleber, Franklin T. Adams-Watters and Joshua Zucker]

Say we have a rule which transforms an integer in another one like this:

- Add to n its odd digits and subtract its even ones.

So 738 will become 740 (738+7+3-8)

103 will become 107 (103+1+3)

and 358 stays 358 (358+3+5-8).

Let’s loop this procedure for integers 0 to 100 and see what happens:

0 -> 0       (a 1-loop or fixed point)

1 -> 2 -> 0  (1-loop)

2 -> 0       (1-loop)

3 -> 6 -> 0  (1-loop)

4 -> 0       (1-loop)

5 -> 10 -> 11 -> 13 -> 17 -> 25 -> 28 -> 18 -> 11       (a 6-loop)

6 -> 0       (1-loop)

7 -> 14 -> 11 -> 13 -> 17 -> 25 -> 28 -> 18 -> 11       (6-loop)

8 -> 0       (1-loop)

9 -> 18 -> 11 -> 13 -> 17 -> 25 -> 28 -> 18             (6-loop)

10 -> 11 -> 13 -> 17 -> 25 -> 28 -> 18 -> 11             (6-loop)

11 -> 13 -> 17 -> 25 -> 28 -> 18 -> 11                   (6-loop)

12 -> 11 -> 13 -> 17 -> 25 -> 28 -> 18 -> 11             (6-loop)

13 -> 17 -> 25 -> 28 -> 18 -> 11 -> 13                   (6-loop)

14 -> 11 -> 13 -> 17 -> 25 -> 28 -> 18 -> 11             (6-loop)

15 -> 21 -> 20 -> 18 -> 11 -> 13 -> 17 -> 25 -> 28 -> 18 (6-loop)

16 -> 11 -> 13 -> 17 -> 25 -> 28 -> 18 -> 11             (6-loop)

17 -> 25 -> 28 -> 18 -> 11 -> 13 -> 17                   (6-loop)

18 -> 11 -> 13 -> 17 -> 25 -> 28 -> 18                   (6-loop)

19 -> 29 -> 36 -> 33 -> 39 -> 51 -> 57 -> 69 -> 72 -> 77 -> 91 -> 101 -> 103 -> 107 -> 115 -> 122 -> 119 -> 130 -> 134 (1-loop or fixed point)

20 -> 18 -> 11 -> 13 -> 17 -> 25 -> 28 -> 18             (6-loop)

21 -> 20 -> 18 -> 11 -> 13 -> 17 -> 25 -> 28 -> 18       (6-loop)

22 -> 18 -> 11 -> 13 -> 17 -> 25 -> 28 -> 18             (6-loop)

23 -> 24 -> 18 -> 11 -> 13 -> 17 -> 25 -> 28 -> 18       (6-loop)

24 -> 18 -> 11 -> 13 -> 17 -> 25 -> 28 -> 18             (6-loop)

25 -> 28 -> 18 -> 11 -> 13 -> 17 -> 25                   (6-loop)

26 -> 18 -> 11 -> 13 -> 17 -> 25 -> 28 -> 18             (6-loop)

27 -> 32 -> 33 -> 39 -> 51 -> 57 -> 69 -> 72 -> 77 -> 91 -> 101 -> 103 -> 107 -> 115 -> 122 -> 119 -> 130 -> 134                   (1-loop)

28 -> 18 -> 11 -> 13 -> 17 -> 25 -> 28                   (6-loop)

29 -> 36 -> 33 -> 39 -> 51 -> 57 -> 69 -> 72 -> 77 -> 91 -> 101 -> 103 -> 107 -> 115 -> 122 -> 119 -> 130 -> 134                   (1-loop)

30 -> 33 -> 39 -> 51 -> 57 -> 69 -> 72 -> 77 -> 91 -> 101 -> 103 -> 107 -> 115 -> 122 -> 119 -> 130 -> 134                         (1-loop)

31 -> 35 -> 43 -> 42 -> 36 -> 33 -> 39 -> 51 -> 57 -> 69 -> 72 -> 77 -> 91 -> 101 -> 103 -> 107 -> 115 -> 122 -> 119 -> 130 -> 134 (1-loop)

32 -> 33 -> 39 -> 51 -> 57 -> 69 -> 72 -> 77 -> 91 -> 101 -> 103 -> 107 -> 115 -> 122 -> 119 -> 130 -> 134                         (1-loop)

33 -> 39 -> 51 -> 57 -> 69 -> 72 -> 77 -> 91 -> 101 -> 103 -> 107 -> 115 -> 122 -> 119 -> 130 -> 134                               (1-loop)

34 -> 33 -> 39 -> 51 -> 57 -> 69 -> 72 -> 77 -> 91 -> 101 -> 103 -> 107 -> 115 -> 122 -> 119 -> 130 -> 134                         (1-loop)

35 -> 43 -> 42 -> 36 -> 33 -> 39 -> 51 -> 57 -> 69 -> 72 -> 77 -> 91 -> 101 -> 103 -> 107 -> 115 -> 122 -> 119 -> 130 -> 134       (1-loop)

36 -> 33 -> 39 -> 51 -> 57 -> 69 -> 72 -> 77 -> 91 -> 101 -> 103 -> 107 -> 115 -> 122 -> 119 -> 130 -> 134                         (1-loop)

37 -> 47 -> 50 -> 55 -> 65 -> 64 -> 54 -> 55             (4-loop)

38 -> 33 -> 39 -> 51 -> 57 -> 69 -> 72 -> 77 -> 91 -> 101 -> 103 -> 107 -> 115 -> 122 -> 119 -> 130 -> 134                         (1-loop)

39 -> 51 -> 57 -> 69 -> 72 -> 77 -> 91 -> 101 -> 103 -> 107 -> 115 -> 122 -> 119 -> 130 -> 134                                     (1-loop)

40 -> 36 -> 33 -> 39 -> 51 -> 57 -> 69 -> 72 -> 77 -> 91 -> 101 -> 103 -> 107 -> 115 -> 122 -> 119 -> 130 -> 134                   (1-loop)

41 -> 38 -> 33 -> 39 -> 51 -> 57 -> 69 -> 72 -> 77 -> 91 -> 101 -> 103 -> 107 -> 115 -> 122 -> 119 -> 130 -> 134                   (1-loop)

42 -> 36 -> 33 -> 39 -> 51 -> 57 -> 69 -> 72 -> 77 -> 91 -> 101 -> 103 -> 107 -> 115 -> 122 -> 119 -> 130 -> 134                   (1-loop)

43 -> 42 -> 36 -> 33 -> 39 -> 51 -> 57 -> 69 -> 72 -> 77 -> 91 -> 101 -> 103 -> 107 -> 115 -> 122 -> 119 -> 130 -> 134             (1-loop)

44 -> 36 -> 33 -> 39 -> 51 -> 57 -> 69 -> 72 -> 77 -> 91 -> 101 -> 103 -> 107 -> 115 -> 122 -> 119 -> 130 -> 134                   (1-loop)

45 -> 46 -> 36 -> 33 -> 39 -> 51 -> 57 -> 69 -> 72 -> 77 -> 91 -> 101 -> 103 -> 107 -> 115 -> 122 -> 119 -> 130 -> 134             (1-loop)

46 -> 36 -> 33 -> 39 -> 51 -> 57 -> 69 -> 72 -> 77 -> 91 -> 101 -> 103 -> 107 -> 115 -> 122 -> 119 -> 130 -> 134                   (1-loop)

47 -> 50 -> 55 -> 65 -> 64 -> 54 -> 55                   (4-loop)

48 -> 36 -> 33 -> 39 -> 51 -> 57 -> 69 -> 72 -> 77 -> 91 -> 101 -> 103 -> 107 -> 115 -> 122 -> 119 -> 130 -> 134                   (1-loop)

49 -> 54 -> 55 -> 65 -> 64 -> 54 -> 55                   (4-loop)

50 -> 55 -> 65 -> 64 -> 54 -> 55                         (4-loop)

51 -> 57 -> 69 -> 72 -> 77 -> 91 -> 101 -> 103 -> 107 -> 115 -> 122 -> 119 -> 130 -> 134                                           (1-loop)

52 -> 55 -> 65 -> 64 -> 54 -> 55                         (4-loop)

53 -> 61 -> 56 -> 55 -> 65 -> 64 -> 54 -> 55             (4-loop)

54 -> 55 -> 65 -> 64 -> 54                               (4-loop)

55 -> 65 -> 64 -> 54 -> 55                               (4-loop)

56 -> 55 -> 65 -> 64 -> 54 -> 55                         (4-loop)

57 -> 69 -> 72 -> 77 -> 91 -> 101 -> 103 -> 107 -> 115 -> 122 -> 119 -> 130 -> 134                                                (1-loop)

58 -> 55 -> 65 -> 64 -> 54 -> 55                         (4-loop)

59 -> 73 -> 83 -> 78 -> 77 -> 91 -> 101 -> 103 -> 107 -> 115 -> 122 -> 119 -> 130 -> 134                                          (1-loop)

60 -> 54 -> 55 -> 65 -> 64 -> 54                         (4-loop)

61 -> 56 -> 55 -> 65 -> 64 -> 54 -> 55                   (4-loop)

62 -> 54 -> 55 -> 65 -> 64 -> 54                         (4-loop)

63 -> 60 -> 54 -> 55 -> 65 -> 64 -> 54                   (4-loop)

64 -> 54 -> 55 -> 65 -> 64                               (4-loop)

65 -> 64 -> 54 -> 55 -> 65                               (4-loop)

66 -> 54 -> 55 -> 65 -> 64 -> 54                         (4-loop)

67 -> 68 -> 54 -> 55 -> 65 -> 64 -> 54                   (4-loop)

68 -> 54 -> 55 -> 65 -> 64 -> 54                         (4-loop)

69 -> 72 -> 77 -> 91 -> 101 -> 103 -> 107 -> 115 -> 122 -> 119 -> 130 -> 134                                                     (1-loop)

70 -> 77 -> 91 -> 101 -> 103 -> 107 -> 115 -> 122 -> 119 -> 130 -> 134                                                           (1-loop)

71 -> 79 -> 95 -> 109 -> 119 -> 130 -> 134                                                                                       (1-loop)

72 -> 77 -> 91 -> 101 -> 103 -> 107 -> 115 -> 122 -> 119 -> 130 -> 134                                                           (1-loop)

73 -> 83 -> 78 -> 77 -> 91 -> 101 -> 103 -> 107 -> 115 -> 122 -> 119 -> 130 -> 134                                               (1-loop)

74 -> 77 -> 91 -> 101 -> 103 -> 107 -> 115 -> 122 -> 119 -> 130 -> 134                                                           (1-loop)

75 -> 87 -> 86 -> 72 -> 77 -> 91 -> 101 -> 103 -> 107 -> 115 -> 122 -> 119 -> 130 -> 134                                         (1-loop)

76 -> 77 -> 91 -> 101 -> 103 -> 107 -> 115 -> 122 -> 119 -> 130 -> 134                                                           (1-loop)

77 -> 91 -> 101 -> 103 -> 107 -> 115 -> 122 -> 119 -> 130 -> 134                                                                 (1-loop)

78 -> 77 -> 91 -> 101 -> 103 -> 107 -> 115 -> 122 -> 119 -> 130 -> 134                                                           (1-loop)

79 -> 95 -> 109 -> 119 -> 130 -> 134                                                                                             (1-loop)

80 -> 72 -> 77 -> 91 -> 101 -> 103 -> 107 -> 115 -> 122 -> 119 -> 130 -> 134                                                     (1-loop)

81 -> 74 -> 77 -> 91 -> 101 -> 103 -> 107 -> 115 -> 122 -> 119 -> 130 -> 134                                                     (1-loop)

82 -> 72 -> 77 -> 91 -> 101 -> 103 -> 107 -> 115 -> 122 -> 119 -> 130 -> 134                                                     (1-loop)

83 -> 78 -> 77 -> 91 -> 101 -> 103 -> 107 -> 115 -> 122 -> 119 -> 130 -> 134                                                     (1-loop)

84 -> 72 -> 77 -> 91 -> 101 -> 103 -> 107 -> 115 -> 122 -> 119 -> 130 -> 134                                                     (1-loop)

85 -> 82 -> 72 -> 77 -> 91 -> 101 -> 103 -> 107 -> 115 -> 122 -> 119 -> 130 -> 134                                               (1-loop)

86 -> 72 -> 77 -> 91 -> 101 -> 103 -> 107 -> 115 -> 122 -> 119 -> 130 -> 134                                                     (1-loop)

87 -> 86 -> 72 -> 77 -> 91 -> 101 -> 103 -> 107 -> 115 -> 122 -> 119 -> 130 -> 134                                               (1-loop)

88 -> 72 -> 77 -> 91 -> 101 -> 103 -> 107 -> 115 -> 122 -> 119 -> 130 -> 134                                                     (1-loop)

89 -> 90 -> 99 -> 117 -> 126 -> 119 -> 130 -> 134                                                                                (1-loop)

90 -> 99 -> 117 -> 126 -> 119 -> 130 -> 134                                                                                      (1-loop)

91 -> 101 -> 103 -> 107 -> 115 -> 122 -> 119 -> 130 -> 134                                                                       (1-loop)

92 -> 99 -> 117 -> 126 -> 119 -> 130 -> 134                                                                                      (1-loop)

93 -> 105 -> 111 -> 114 -> 112                                                                                                   (1-loop)

94 -> 99 -> 117 -> 126 -> 119 -> 130 -> 134                                                                                      (1-loop)

95 -> 108 -> 101 -> 103 -> 107 -> 115 -> 122 -> 119 -> 130 -> 134                                                                (1-loop)

96 -> 99 -> 117 -> 126 -> 119 -> 130 -> 134                                                                                      (1-loop)

97 -> 113 -> 118 -> 112                                                                                                          (1-loop)

98 -> 99 -> 117 -> 126 -> 119 -> 130 -> 134                                                                                      (1-loop)

99 -> 117 -> 126 -> 119 -> 130 -> 134                                                                                            (1-loop)

100 -> 101 -> 103 -> 107 -> 115 -> 122 -> 119 -> 130 -> 134                                                                      (1-loop)

...

Well, is there something interesting in this exhaustive search or will those chains always end in loops and fixed points? Could all fixed points be reached? The chain 19-134 has 19 terms: could a chain be as long as one wishes? (*)

The first such fixed points are listed here: 112, 121, 134, 143, 156, 165, 178, 187, 211, 314, 336, 341, 358, 363, 385, 413, 431, 516, 538, 561, 583, 615, 633, 651, 718, 781, 817, 835, 853, 871, 1012...

The sequence of integers looping on them-selves with the rule “Add odd digits, subtract even ones” will be submitted soon to Neil Sloane’s OEIS; it starts like this (and includes all terms of A036301, of course):

0,11,13,17,18,25,28,54,55,64,65,112,121,134,137,143,148,155,156,165,166,173...

Those are the numbers highlighted in black, in the first column of the above table (and in blue on r.e.s.’s diagram at very bottom of page).

Best,

É.

(the other way rule -add even digits, subtract odd ones- is there)

_____________________________

(...)

Every chain of this sort will end in a loop of some sort. Consider a number N starting with n+2 “8” digits, followed by n 0's, with n >= 1. Any number less than this which transforms to something larger will still transform to number starting with n+2 8's, and then the next term(s) will be smaller until a number less than N is reached.

The chain thus cannot grow to infinity, so it must eventually loop.

Certainly the length of a chain increases without limit: start with a large enough sequence of digits with the same parity (not 0's or 9's), and you will get a large number of steps in the same direction. The interesting question is whether there are arbitrarily large loops. My guess is that there are not.

Essentially the same argument applies to adding even digits and subtracting odd; just look at 9's instead of 8's.

(...)

_____________________________

Joshua Zucker:

I played around with this a little, and found: up to 1000000, the longest cycle is 11, and cycles of that length include the following numbers (I didn't check to be sure that I have only one representative of each, though it looks like there's enough distance between them that I'm OK):

18201 81201 108201 126201 144201 162201 180201 216201 238201 261201 283201 328201 346201 364201 382201 414201 436201 441201 458201 463201 485201 548201 566201 584201 612201 621201 634201 643201 656201 665201 678201 687201 768201 786201 801201 810201 823201 832201 845201 854201 867201 876201 889201 898201 988201

Why do they all end in 201???

Here is one element of each cycle of length 10:

128201 146201 164201 182201 218201 281201 348201 366201 384201 416201 438201 461201 483201 568201 586201 614201 636201 641201 658201 663201 685201 687980 788201 812201 821201 834201 843201 856201 865201 867980 878201 887201

An example of one full cycle, length 11:

18191 -> 18195 -> 18203 -> 18197 -> 18207 -> 18205 -> 18201 -> 18193 -> 18199 -> 18211 -> 18204 -> 18191

and length 10:

128191 -> 128193 -> 128197 -> 128205 -> 128199 -> 128209 -> 128207 -> 128203 -> 128195 -> 128201 -> 128191

A cycle of length 9 that doesn't involve ending in 201 (uses 101 instead):

6095 -> 6103 -> 6101 -> 6097 -> 6107 -> 6109 -> 6113 -> 6112 -> 6106 -> 6095

and one that does:

16193 -> 16201 -> 16195 -> 16205 -> 16203 -> 16199 -> 16213 -> 16210 -> 16204 -> 16193

and here's a few really unusual ones:

600012 600005 600004 599994 600031 600029 600030 600027 600026 380037 380042 380031 380030 380028 380013 380012 380006 379995 687974 687979 687997 688015 687999 688019 688007 687992 688001 687980 867974 867979 867997 868015 867999 868019 868007 867992 868001 867980

(all the rest of length 9 or more under a million contain a number ending in 101 or 201).

Of course, with more digits there will be trivial variations of these weird ones, e.g. which replace a leading 3 with 111, or a leading 6 with 42 or 24 or 222.

_____________________________

On december 4th, 2006, I’ve asked on rec.puzzles:

Hello,

could someone be so nice to compute for me two hundred more terms of

this sequence:

0,11,13,17,18,25,28,54,55,64,65...

Explanations can be found there:

I'll mention yr name in Neil Sloane's OEIS if the sequence is accepted.

Thanks,

Éric A.

[crossposted to alt.math.recreational an hour ago]

Got this answer a few minutes later, from “Barry” and “Jongware”:

0 11 13 17 18 25 28 54 55 64 65 112 121 134 137 143 148 155 156 165 166 173

178 184 187 198 200 209 211 216 231 233 234 237 244 245 270 275 280 285 314

336 341 358 363 385 396 402 407 410 413 429 431 432 450 451 453 457 460 465

516 538 561 583 594 604 615 633 651 671 673 676 677 685 718 781 792 806 817

835 853 871 1012 1021 1034 1037 1043 1048 1055 1056 1065 1066 1073 1078 1084

1087 1102 1120 1135 1138 1145 1148 1201 1210 1217 1223 1224 1232 1235 1242

1245 1253 1254 1260 1267 1276 1289 1298 1304 1322 1340 1378 1381 1397 1403

1408 1415 1417 1418 1422 1425 1430 1447 1452 1469 1474 1496 1506 1524 1542

1560 1578 1583 1584 1595 1605 1606 1615 1616 1627 1649 1650 1672 1694 1708

1726 1744 1762 1780 1793 1804 1807 1810 1813 1829 1870 1892 1928 1946 1964

1982 2009 2011 2016 2031 2033 2034 2037 2044 2045 2070 2075 2080 2085 2101

2110 2117 2123 2124 2132 2135 2142 2145 2153 2154 2160 2167 2176 2189 2198

2207 2210 2213 2229 2231 2232 2250 2251 2253 2257 2260 2265 2312 2321 2334

2337 2343 2348 2355 2356 2365 2366 2373 2378 2384 2387 2394 2400 2415 2433

2451 2471 2473 2476 2477 2485 2514 2536 2541 2558 2563 2585 2592 2602 2617

2635 2653 2671 2716 2738 2761 2783 2790 2804 2819 2837 2855 2873 2891 2918

2981 3014 3036 3041 3058 3063 3085 3104 3122 3140 3178 3181 3212 3221 3234

3237 3243 3248 3255 3256 3265 3266 3273 3278 3284 3287 3306 3324 3342 3360

3378 3383 3384 3401 3410 3417 3423 3424 3432 3435 3442 3445 3453 3454 3460

3467 3476 3489 3498 3508 3526 3544 3562 3580 3597 3603 3608 3615 3617 3618

3621 3622 3625 3630 3647 3652 3669 3674 3696 3728 3746 3764 3782 3795 3805

3806 3812 3813 3819 3824 3827 3849 3850 3872 3894 3948 3966 3984 4007 4010

4013 4029 4031 4032 4050 4051 4053 4057 4060 4065 4097 4103 4108 4109 4115

4118 4125 4130 4147 4152 4169 4174 4196 4215 4233 4251 4271 4273 4276 4277

4285 4301 4310 4317 4323 4324 4332 4335 4342 4345 4353 4354 4360 4367 4376

4389 4398 4417 4435 4453 4471 4512 4521 4534 4537 4543 4548 4555 4556 4565

4566 4573 4578 4584 4587 4590 4600 4619 4637 4655 4673 4691 4714 4736 4741

4758 4763 4775 4785 4788 4790 4802 4839 4857 4875 4893 4916 4938 4961 4983

5016 5038 5061 5083 5106 5124 5142 5160 5178 5183 5184 5214 5236 5241 5258

5263 5285 5308 5326 5344 5362 5380 5412 5421 5434 5437 5443 5448 5455 5456

5465 5466 5473 5478 5484 5487 5528 5546 5564 5582 5601 5610 5617 5623 5624

5632 5635 5642 5645 5653 5654 5660 5667 5676 5689 5698 5748 5766 5784 5803

5825 5830 5847 5852 5869 5874 5896 5968 5986 5994 6007 6008 6011 6013 6015

6033 6051 6071 6073 6076 6077 6085 6095 6097 6101 6103 6105 6106 6107 6109

6112 6113 6127 6149 6150 6172 6194 6217 6235 6253 6271 6297 6303 6305 6307

6308 6310 6311 6325 6330 6347 6352 6369 6374 6396 6419 6437 6455 6473 6491

6501 6510 6517 6523 6524 6532 6535 6542 6545 6553 6554 6560 6567 6576 6589

6598 6599 6616 6639 6657 6675 6693 6712 6721 6734 6737 6743 6748 6755 6756

6765 6766 6773 6778 6784 6787 6797 6814 6859 6877 6895 6914 6936 6941 6958

6963 6985 7018 7081 7108 7126 7144 7162 7180 7216 7238 7261 7283 7328 7346

7364 7382 7414 7436 7441 7458 7463 7485 7548 7566 7584 7612 7621 7634 7637

7643 7648 7655 7656 7665 7666 7673 7678 7684 7687 7768 7786 7801 7810 7817

7823 7824 7832 7835 7842 7845 7853 7854 7860 7867 7876 7889 7898 7988 7998

8003 8009 8010 8013 8015 8017 8035 8053 8071 8093 8095 8097 8099 8101 8103

8105 8106 8107 8109 8111 8129 8170 8192 8219 8237 8255 8273 8291 8295 8297

8299 8301 8303 8305 8306 8307 8309 8312 8313 8327 8349 8350 8372 8394 8399

8412 8439 8457 8475 8493 8497 8499 8501 8503 8505 8507 8508 8510 8511 8525

8530 8547 8552 8569 8574 8596 8597 8610 8659 8677 8695 8701 8710 8717 8723

8724 8732 8735 8742 8745 8753 8754 8760 8767 8776 8789 8798 8879 8897 8912

8921 8934 8937 8943 8948 8955 8956 8965 8966 8973 8978 8984 8987 9128 9146

9164 9182 9218 9281 9348 9366 9384 9416 9438 9461 9483 9568 9586 9614 9636

9641 9658 9663 9685 9788 9812 9821 9834 9837 9843 9848 9855 9856 9865 9866

9873 9878 9884 9887 10012 10021 10034 10037 10043 10048 10055 10056 10065

10066 10073 10078 10084 10087 10102 10120 10135 10138 10145 10148 10201

10210 10217 10223 10224 10232 10235 10242 10245 10253 10254 10260 10267

10276 10289 10298 10304 10322 10340 10378 10381 10397 10403 10408 10415

10417 10418 10422 10425 10430 10447 10452 10469 10474 10496 10506 10524

10542 10560 10578 10583 10584 10595 10605 10606 10615 10616 10627 10649

10650 10672 10694 10708 10726 10744 10762 10780 10793 10804 10807 10810

10813 10829 10870 10892 10928 10946 10964 10982 11002 11020 11035 11038

11045 11048 11114 11136 11141 11158 11163 11185 11200 11211 11213 11217

11218 11225 11228 11254 11255 11264 11265 11316 11338 11361 11383 11398

11404 11409 11411 11416 11431 11433 11434 11437 11444 11445 11470 11475

11480 11485 11518 11581 11596 11606 11607 11610 11613 11629 11631 11632

11650 11651 11653 11657 11660 11665 11794 11808 11815 11833 11851 11871

11873 11876 11877 11885 12001 12010 12017 12023 12024 12032 12035 12042

12045 12053 12054 12060 12067 12076 12089 12098 12100 12111 12113 12117

12118 12125 12128 12154 12155 12164 12165 12197 12203 12208 12213 12214

12225 12230 12247 12252 12269 12274 12296 12302 12320 12335 12338 12345

12348 12395 12405 12408 12411 12427 12449 12450 12472 12494 12504 12522

12540 12578 12581 12593 12606 12607 12609 12611 12629 12670 12692 12706

12724 12742 12760 12778 12783 12784 12791 12793 12801 12804 12805 12807

12809 12811 12890 12908 12926 12944 12962 12980 13004 13022 13040 13078

13081 13116 13138 13161 13183 13202 13220 13235 13238 13245 13248 13318

13381 13400 13411 13413 13417 13418 13425 13428 13454 13455 13464 13465

13598 13608 13609 13611 13616 13631 13633 13634 13637 13644 13645 13670

13675 13680 13685 13807 13810 13813 13829 13831 13832 13850 13851 13853

13857 13860 13865 13997 14003 14008 14015 14018 14025 14026 14030 14047

14052 14069 14074 14096 14109 14111 14116 14131 14133 14134 14137 14144

14145 14170 14175 14180 14185 14195 14205 14206 14207 14209 14212 14213

14227 14249 14250 14272 14294 14300 14311 14313 14317 14318 14325 14328

14354 14355 14364 14365 14393 14399 14403 14404 14405 14407 14417 14418

14429 14470 14492 14502 14520 14535 14538 14545 14548 14591 14593 14597

14601 14602 14603 14605 14607 14609 14612 14615 14690 14704 14722 14740

14778 14781 14789 14794 14795 14803 14806 14813 14906 14924 14942 14960

14978 14983 14984 15006 15024 15042 15060 15078 15083 15084 15118 15181

15204 15222 15240 15278 15281 15402 15420 15435 15438 15445 15448 15600

15611 15613 15617 15618 15625 15628 15654 15655 15664 15665 15809 15811

15816 15831 15833 15834 15837 15844 15845 15870 15875 15880 15885 15995

16005 16006 16012 16013 16024 16027 16049 16050 16072 16094 16107 16110

16113 16129 16131 16132 16150 16151 16153 16157 16160 16165 16193 16195

16199 16201 16203 16204 16205 16207 16210 16213 16229 16270 16292 16309

16311 16316 16331 16333 16334 16337 16344 16345 16370 16375 16380 16385

16391 16399 16402 16409 16412 16415 16490 16500 16511 16513 16517 16518

16525 16528 16554 16555 16564 16565 16589 16590 16591 16595 16599 16600

16601 16603 16607 16609 16614 16617 16702 16720 16735 16738 16745 16748

16774 16779 16787 16788 16789 16792 16797 16801 16808 16815 16904 16922

16940 16978 16981 17008 17026 17044 17062 17080 17206 17224 17242 17260

17278 17283 17284 17404 17422 17440 17478 17481 17602 17620 17635 17638

17645 17648 17800 17811 17813 17817 17818 17825 17828 17854 17855 17864

17865 17993 18006 18007 18011 18022 18029 18070 18092 18115 18133 18151

18171 18173 18176 18177 18185 18191 18193 18195 18197 18199 18201 18203

18204 18205 18207 18209 18211 18290 18307 18310 18313 18329 18331 18332

18350 18351 18353 18357 18360 18365 18509 18511 18516 18531 18533 18534

18537 18544 18545 18570 18575 18580 18585 18593 18603 18700 18711 18713

18717 18718 18725 18728 18754 18755 18764 18765 18772 18777 18786 18787

18791 18796 18799 18801 18810 18817 18902 18920 18935 18938 18945 18948

19028 19046 19064 19082 19208 19226 19244 19262 19280 19406 19424 19442

19460 19478 19483 19484 19604 19622 19640 19678 19681 19802 19820 19835

19838 19845 19848 20009 20011 20016 20031 20033 20034 20037 20044 20045

20070 20075 20080 20085 20101 20110 20117 20123 20124 20132 20135 20142

20145 20153 20154 20160 20167 20176 20189 20198 20207 20210 20213 20229

20231 20232 20250 20251 20253 20257 20260 20265 20312 20321 20334 20337

20343 20348 20355 20356 20365 20366 20373 20378 20384 20387 20394 20400

20415 20433 20451 20471 20473 20476 20477 20485 20514 20536 20541 20558

20563 20585 20592 20602 20617 20635 20653 20671 20716 20738 20761 20783

20790 20804 20819 20837 20855 20873 20891 20918 20981 21001 21010 21017

21023 21024 21032 21035 21042 21045 21053 21054 21060 21067 21076 21089

21098 21100 21111 21113 21117 21118 21125 21128 21154 21155 21164 21165

21197 21203 21208 21213 21214 21225 21230 21247 21252 21269 21274 21296

21302 21320 21335 21338 21345 21348 21395 21405 21408 21411 21427 21449

21450 21472 21494 21504 21522 21540 21578 21581 21593 21606 21607 21609

21611 21629 21670 21692 21706 21724 21742 21760 21778 21783 21784 21791

21793 21801 21804 21805 21807 21809 21811 21890 21908 21926 21944 21962

21980 22007 22010 22013 22029 22031 22032 22050 22051 22053 22057 22060

22065 22097 22103 22108 22109 22115 22118 22125 22130 22147 22152 22169

22174 22196 22215 22233 22251 22271 22273 22276 22277 22285 22301 22310

22317 22323 22324 22332 22335 22342 22345 22353 22354 22360 22367 22376

22389 22398 22417 22435 22453 22471 22512 22521 22534 22537 22543 22548

22555 22556 22565 22566 22573 22578 22584 22587 22590 22600 22619 22637

22655 22673 22691 22714 22736 22741 22758 22763 22775 22785 22788 22790

22802 22839 22857 22875 22893 22916 22938 22961 22983 23012 23021 23034

23037 23043 23048 23055 23056 23065 23066 23073 23078 23084 23087 23102

23120 23135 23138 23145 23148 23201 23210 23217 23223 23224 23232 23235

23242 23245 23253 23254 23260 23267 23276 23289 23298 23304 23322 23340

23378 23381 23397 23403 23408 23415 23417 23418 23422 23425 23430 23447

23452 23469 23474 23496 23506 23524 23542 23560 23578 23583 23584 23595

23605 23606 23615 23616 23627 23649 23650 23672 23694 23708 23726 23744

23762 23780 23793 23804 23807 23810 23813 23829 23870 23892 23928 23946

23964 23982 23994 24004 24005 24009 24012 24015 24033 24051 24071 24073

24076 24077 24085 24095 24097 24101 24103 24105 24106 24107 24109 24112

24113 24127 24149 24150 24172 24194 24217 24235 24253 24271 24297 24303

24305 24307 24308 24310 24311 24325 24330 24347 24352 24369 24374 24396

24419 24437 24455 24473 24491 24501 24510 24517 24523 24524 24532 24535

24542 24545 24553 24554 24560 24567 24576 24589 24598 24599 24616 24639

24657 24675 24693 24712 24721 24734 24737 24743 24748 24755 24756 24765

24766 24773 24778 24784 24787 24797 24814 24859 24877 24895 24914 24936

24941 24958 24963 24985 25014 25036 25041 25058 25063 25085 25104 25122

25140 25178 25181 25212 25221 25234 25237 25243 25248 25255 25256 25265

25266 25273 25278 25284 25287 25306 25324 25342 25360 25378 25383 25384

25401 25410 25417 25423 25424 25432 25435 25442 25445 25453 25454 25460

25467 25476 25489 25498 25508 25526 25544 25562 25580 25597 25603 25608

25615 25617 25618 25621 25622 25625 25630 25647 25652 25669 25674 25696

25728 25746 25764 25782 25795 25805 25806 25812 25813 25819 25824 25827

25849 25850 25872 25894 25948 25966 25984 25992 26002 26005 26011 26017

26035 26053 26071 26093 26095 26097 26099 26101 26103 26105 26106 26107

26109 26111 26129 26170 26192 26219 26237 26255 26273 26291 26295 26297

26299 26301 26303 26305 26306 26307 26309 26312 26313 26327 26349 26350

26372 26394 26399 26412 26439 26457 26475 26493 26497 26499 26501 26503

26505 26507 26508 26510 26511 26525 26530 26547 26552 26569 26574 26596

26597 26610 26659 26677 26695 26701 26710 26717 26723 26724 26732 26735

26742 26745 26753 26754 26760 26767 26776 26789 26798 26879 26897 26912

26921 26934 26937 26943 26948 26955 26956 26965 26966 26973 26978 26984

26987 27016 27038 27061 27083 27106 27124 27142 27160 27178 27183 27184

27214 27236 27241 27258 27263 27285 27308 27326 27344 27362 27380 27412

27421 27434 27437 27443 27448 27455 27456 27465 27466 27473 27478 27484

27487 27528 27546 27564 27582 27601 27610 27617 27623 27624 27632 27635

27642 27645 27653 27654 27660 27667 27676 27689 27698 27748 27766 27784

27803 27825 27830 27847 27852 27869 27874 27896 27968 27986 27990 28004

28007 28013 28019 28037 28055 28073 28091 28093 28095 28097 28099 28101

28103 28105 28107 28109 28190 28239 28257 28275 28293 28295 28297 28299

28301 28303 28305 28307 28329 28370 28392 28459 28477 28495 28497 28499

28501 28503 28505 28527 28549 28550 28572 28594 28679 28697 28699 28701

28703 28725 28730 28747 28752 28769 28774 28796 28899 28901 28910 28917

28923 28924 28932 28935 28942 28945 28953 28954 28960 28967 28976 28989

28998 29018 29081 29108 29126 29144 29162 29180 29216 29238 29261 29283

29328 29346 29364 29382 29414 29436 29441 29458 29463 29485 29548 29566

29584 29612 29621 29634 29637 29643 29648 29655 29656 29665 29666 29673

29678 29684 29687 29768 29786 29801 29810 29817 29823 29824 29832 29835

29842 29845 29853 29854 29860 29867 29876 29889 29898 29988

... which are the 2,335 used values in the first 30,001 integers (0 to 30,000). Want more?

_____________________________

No, thanks 30001 times, Barry and Jongware!

É.

_____________________________

On december 5th I received those beautiful diagrams from r.e.s. In blue are the “self-loopers”:

Some questions that come to mind for this discrete dynamical system (just throwing these out -- haven't really thought much about them):

(1) Are there infinitely-many attractors?

(2) If there are infinitely-many attractors, which ones (if any, besides 0) attract only finitely-many points? All of them?

(3) What is the set of attractor periods?  (E.g., we have 1,4,6,... -- but are there none of period 2,3,5?)

(4) In listing the attractor-points in increasing order as you've done, will some of the attractors overlap? (E.g., is there any occurrence of ...,a,b,c,... where a,c is part of one attractor and b is part of another?)

(5) How complicated does the structure of the attractor basins become? (E.g., if there exists an attractor that attracts infinitely-many points, do its "tributaries" exhibit infinitely-many "forks"?)

--r.e.s.

Any takers?

________________________

Received December 6th, from Jongware (a.k.a. Theunis de Jong):

Just a thought on the longest chain :)

Rewrote my proggie to return the length of the chain per number and show the longest one. In the range up to 1,000,000, the longest is a staggering 289 numbers long:

883867 -> 883847 -> 883829 -> 883815 -> 883800 -> 883779 -> 883789 -> 883784 -> 883766 -> 883748 -> 883730 -> 883727 -> 883726 -> 883712 -> 883705 -> 883704 -> 883694 -> 883680 -> 883653 -> 883642 -> 883617 -> 883606 -> 883581 -> 883566 -> 883546 -> 883528 -> 883510 -> 883503 -> 883498 -> 883482 -> 883455 -> 883448 -> 883419 -> 883412 -> 883394 -> 883389 -> 883380 -> 883362 -> 883344 -> 883326 -> 883308 -> 883290 -> 883284 -> 883257 -> 883254 -> 883240 -> 883221 -> 883205 -> 883195 -> 883197 -> 883201 -> 883187 -> 883174 -> 883165 -> 883152 -> 883143 -> 883130 -> 883121 -> 883108 -> 883088 -> 883059 -> 883060 -> 883041 -> 883025 -> 883015 -> 883008 -> 882987 -> 882977 -> 882982 -> 882963 -> 882951 -> 882948 -> 882927 -> 882923 -> 882915 -> 882912 -> 882902 -> 882891 -> 882875 -> 882861 -> 882830 -> 882807 -> 882788 -> 882761 -> 882745 -> 882735 -> 882732 -> 882722 -> 882707 -> 882703 -> 882695 -> 882685 -> 882658 -> 882631 -> 882611 -> 882589 -> 882577 -> 882578 -> 882564 -> 882541 -> 882525 -> 882515 -> 882508 -> 882487 -> 882464 -> 882432 -> 882411 -> 882391 -> 882386 -> 882357 -> 882354 -> 882340 -> 882321 -> 882305 -> 882295 -> 882289 -> 882270 -> 882257 -> 882249 -> 882234 -> 882213 -> 882197 -> 882196 -> 882182 -> 882155 -> 882148 -> 882119 -> 882112 -> 882094 -> 882081 -> 882056 -> 882037 -> 882029 -> 882018 -> 881993 -> 881999 -> 882011 -> 881995 -> 882003 -> 881988 -> 881966 -> 881948 -> 881930 -> 881927 -> 881926 -> 881912 -> 881905 -> 881904 -> 881894 -> 881876 -> 881854 -> 881832 -> 881810 -> 881788 -> 881764 -> 881746 -> 881728 -> 881710 -> 881703 -> 881698 -> 881678 -> 881656 -> 881634 -> 881612 -> 881590 -> 881589 -> 881580 -> 881562 -> 881544 -> 881526 -> 881508 -> 881490 -> 881480 -> 881453 -> 881442 -> 881417 -> 881406 -> 881381 -> 881362 -> 881342 -> 881324 -> 881306 -> 881288 -> 881255 -> 881248 -> 881219 -> 881212 -> 881194 -> 881185 -> 881168 -> 881140 -> 881122 -> 881104 -> 881086 -> 881057 -> 881054 -> 881040 -> 881021 -> 881005 -> 880995 -> 881002 -> 880985 -> 880975 -> 880980 -> 880965 -> 880957 -> 880962 -> 880947 -> 880943 -> 880935 -> 880936 -> 880926 -> 880911 -> 880906 -> 880893 -> 880881 -> 880850 -> 880831 -> 880811 -> 880789 -> 880781 -> 880765 -> 880755 -> 880756 -> 880746 -> 880727 -> 880723 -> 880715 -> 880712 -> 880702 -> 880691 -> 880679 -> 880673 -> 880661 -> 880634 -> 880611 -> 880591 -> 880590 -> 880588 -> 880561 -> 880545 -> 880535 -> 880532 -> 880522 -> 880507 -> 880503 -> 880495 -> 880489 -> 880470 -> 880457 -> 880449 -> 880434 -> 880413 -> 880397 -> 880400 -> 880380 -> 880359 -> 880360 -> 880341 -> 880325 -> 880315 -> 880308 -> 880287 -> 880268 -> 880236 -> 880215 -> 880203 -> 880188 -> 880157 -> 880154 -> 880140 -> 880121 -> 880105 -> 880095 -> 880093 -> 880089 -> 880074 -> 880061 -> 880040 -> 880020 -> 880002 -> 879984 -> 879989 -> 880007 -> 879998 -> 880016 -> 879995 -> 880026 -> 880002 (9-loop, 289 iterations)

The max length is logically somehow linked to the number of decimals in the starting number (but *how* is entirely beyond my comprehension :)

________________________

Beautiful! Thanks again, Theunis, and to all other contributors as well!

This sequence is now in the OEIS as A124176.