Reverse and add (my digits)


Reverse and add (my digits) until a palindrome

We take any integer p (like 12), reverse it to form q (21), add to q the sum of q’s digits (21 + 3 = 24) and iterate (leading zeros are always canceled from q) until we hit a palindrome or enter in a loop. Will some starting integer p escape those two fates? Not if p < 50, as shown hereunder.
 
Sequen 1, 2 hit
Revers 1
DigSum 1
 
Sequen 2, 4 hit
Revers 2
DigSum 2
 
Sequen 3, 6 hit
Revers 3
DigSum 3
 
Sequen 4, 8 hit
Revers 4
DigSum 4
 
Sequen 5, 10, 2, seen2
Revers 5  01     hit
DigSum 5   1
 
Sequen 6, 12, 24, 48, 96, 84, 60, 12 loop
Revers 6  21  42  84  69  48  06
DigSum 6   3   6  12  15  12   6
 
Sequen 7, 14, 46, 74, 58, 98, 106, 608, 820, 38, 94, 62, 34, 50, 10 seen5
Revers 7  41  64  47  85  89  601  806  028  83  49  26  43  05     hit
DigSum 7   5  10  11  13  17    7   14   10  11  13   8   7   5
 
Sequen 8, 16, 68, 100, 2, seen2
Revers 8  61  86  001     hit
DigSum 8   7  14    1
 
Sequen 9, 18, 90, 18 loop
Revers 9  81  09
DigSum 9   9   9
 
Sequen 10, seen5
Revers     hit
DigSum
 
Sequen 11, 13, 35, 61, 23, 37, 83, 49, 107, 709, 923, 343 hit
Revers 11  31  53  16  32  73  38  94  701  907  329
DigSum  2   4   8   7   5  10  11  13    8   16   14
 
Sequen 12, seen6
Revers     loop
DigSum
 
Sequen 13, seen11
Revers     hit
DigSum
 
Sequen 14, seen7
Revers     hit
DigSum
 
Sequen 15, 57, 87, 93, 51, 21, 15 loop
Revers 51  75  78  39  15  12
DigSum  6  12  15  12   6   3
 
Sequen 16, seen8
Revers     hit
DigSum
 
Sequen 17, 79, 113, 316, 623, 634, 449, 961, 185, 595 hit
Revers 71  97  311  613  326  436  944  169  581
DigSum  8  16    5   10   11   13   17   16   14
 
Sequen 18, seen9
Revers     loop
DigSum
 
Sequen 19, 101 hit
Revers 91 
DigSum 10 
 
Sequen 20, 4, seen4
Revers 02     hit
DigSum  2
 
Sequen 21, seen15
Revers     loop
DigSum
 
Sequen 22, 26, 70, 14, seen7
Revers 22  62  07      hit
DigSum  4   8   7
 
Sequen 23, seen11
Revers     hit
DigSum
 
Sequen 24, seen6
Revers     loop
DigSum
 
Sequen 25, 59, 109, 911, 130, 35, seen11
Revers 52  95  901  119  031      hit
DigSum  7  14   10   11    4
 
Sequen 26, seen22
Revers     hit
DigSum
 
Sequen 27, 81, 27, loop
Revers 72  18
DigSum  9   9
 
Sequen 28, 92, 40, 8, seen8
Revers 82  29  04     hit
DigSum 10  11   4
 
Sequen 29, 103, 305, 511, 122, 226, 632, 247, 755, 574, 491, 208, 812, 229,
Revers 92  301  503  115  221  622  236  742  557  475  194  802  218  922
DigSum 11    4    8    7    5   10   11   13   17   16   14   10   11   13
Sequen 935, 556, 671, 190, 101 hit
Revers 539  655  176  091
DigSum  17   16   14   10
 
Sequen 30, 6 seen6
Revers 03    loop
DigSum  3
 
Sequen 31, 17, seen17
Revers 13      hit
DigSum  4
 
Sequen 32, 28, seen8
Revers 23      hit
DigSum  5 
 
Sequen 33, 39, 105, 507, 717 hit
Revers 33  93  501  705
DigSum  6  12    6   12
 
Sequen 34, seen7
Revers     hit
DigSum 
 
Sequen 35, 61, 23, seen11
Revers 53  16      hit
DigSum  8   7
 
Sequen 36, 72, 36 loop
Revers 63  27
DigSum  9   9
 
Sequen 37, seen11
Revers     hit
DigSum
 
Sequen 38, seen7
Revers     hit
DigSum
 
Sequen 39, seen33
Revers     hit
DigSum
 
Sequen 40, seen28
Revers     hit
DigSum
 
Sequen 41, 19, seen19
Revers 14      hit
DigSum  5
 
Sequen 42, 30, seen30
Revers 24      loop
DigSum  6
 
Sequen 43, 41, seen41
Revers 34      hit
DigSum  7
 
Sequen 44, 52, 32, seen8
Revers 44  25      hit
DigSum  8   7
 
Sequen 45, 63, 45, loop
Revers 54  36
DigSum  9   9
 
Sequen 46, seen7
Revers     hit
DigSum
 
Sequen 47, 85, 71, 25, seen25
Revers 74  58  17      hit
DigSum 11  13   8
 
Sequen 48, seen6
Revers     loop
DigSum
 
Sequen 49, seen11
Revers     hit
DigSum
 
Sequen 50, seen7
Revers     hit
DigSum

etc.
 
 
 
 
 
 

Commentaires

  1. Ce commentaire a été supprimé par l'auteur.

    RépondreSupprimer
  2. Hit 287 terms for p < 5*10^8, the following triplets (1st term, last term, number of terms) have increasingly been found :

    (11, 343, 12), (17, 343, 22), (31, 343, 23), (116, 343, 28), (211, 343, 29), (725, 5335, 30), (907, 5335, 31), (1046, 343, 36), (1069, 343, 39), (1231, 838, 45), (1769, 838, 50), (3571, 838, 51), (4553, 838, 52), (10553, 838, 68), (12076, 838, 87), (44329, 343, 89), (52309, 343, 91), (68225, 343, 92), (101479, 343, 107), (111585, 696, 115), (120495, 696, 121), (122583, 969, 124), (191559, 969, 126), (535191, 969, 127), (1000173, 696, 129), (1003467, 78087, 137), (1021269, 858, 145), (1040169, 858, 163), (1091379, 858, 165), (1181289, 858, 171), (1421781, 858, 174), (10000173, 777, 175), (10002432, 969, 176), (10003467, 444, 209), (10320681, 717, 214), (10402284, 969, 216), (11220591, 717, 220), (18120567, 717, 222), (34502181, 717, 223), (100003467, 858, 227), (100200864, 717, 234), (101020269, 969, 236), (101230683, 858, 246), (101301474, 696, 249), (103002681, 696, 263), (103110681, 12021, 278), (112110591, 12021, 284), (181110567, 12021, 286), (345011181, 12021, 287)

    RépondreSupprimer
  3. 287 terms for p < 5*10^8, top that!

    345011181, 181110567, 765011211, 112110591, 195011232, 232110615, 516011253, 352110639, 936011283, 382110672, 276011313, 313110696, 696011343, 343110729, 927011373, 373110762, 267011403, 304110786, 687011433, 334110819, 918011463, 364110852, 258011493, 394110885, 588011532, 235110918, 819011562, 265110951, 159011592, 295110984, 489011631, 136111017, 710111652, 256111041, 140111673, 376111065, 560111703, 307111089, 980111733, 337111122, 221111754, 457111146, 641111784, 487111179, 971111823, 328111212, 212111844, 448111236, 632111874, 478111269, 962111913, 319111302, 203111934, 439111326, 623111964, 469111359, 953112003, 300211383, 383112024, 420211407, 704112045, 540211431, 134112066, 660211455, 554112096, 690211488, 884112135, 531211521, 125112156, 651211545, 545112186, 681211578, 875112225, 522211611, 116112246, 642211635, 536112276, 672211668, 866112315, 513211701, 107112336, 633211725, 527112366, 663211758, 857112405, 504211791, 197112435, 534211824, 428112465, 564211857, 758112504, 405211890, 98112534, 43521222, 22212555, 55521246, 64212585, 58521279, 97212624, 42621312, 21312645, 54621336, 63312675, 57621369, 96312714, 41721402, 20412735, 53721426, 62412765, 56721459, 95412804, 40821492, 29412834, 43821525, 52512864, 46821558, 85512903, 30921591, 19512933, 33921624, 42612963, 36921657, 75613002, 20031681, 18613023, 32031705, 50713044, 44031729, 92713074, 47031762, 26713104, 40131786, 68713134, 43131819, 91813164, 46131852, 25813194, 49131885, 58813233, 33231918, 81913263, 36231951, 15913293, 39231984, 48913332, 23332017, 71023353, 35332041, 14023374, 47332065, 56023404, 40432089, 98023434, 43432122, 22123455, 55432146, 64123485, 58432179, 97123524, 42532212, 21223545, 54532236, 63223575, 57532269, 96223614, 41632302, 20323635, 53632326, 62323665, 56632359, 95323704, 40732392, 29323734, 43732425, 52423764, 46732458, 85423803, 30832491, 19423833, 33832524, 42523863, 36832557, 75523902, 20932590, 9523932, 2393292, 2923962, 2693325, 5233992, 2993358, 8534031, 1304382, 2834052, 2504406, 6044073, 3704430, 344094, 490467, 764124, 421491, 194145, 541515, 515166, 661539, 935196, 691572, 275226, 622596, 695256, 652629, 926286, 682662, 266316, 613686, 686346, 643719, 917376, 673752, 257406, 604776, 677436, 634809, 908466, 664842, 248496, 694875, 578535, 535908, 809565, 565941, 149595, 595974, 479634, 437007, 700755, 557031, 130776, 677055, 550806, 608079, 970836, 638112, 211857, 758136, 631887, 788169, 961926, 629202, 202947, 749226, 622977, 779259, 953016, 610383, 383037, 730407, 704058, 850431, 134079, 970455, 554109, 901479, 974139, 931512, 215160, 61527, 72537, 73551, 15558, 85575, 57588, 88608, 80718, 81732, 23739, 93756, 65769, 96789, 98808, 80922, 22929, 92946, 64959, 95979, 97998, 90021, 12021

    RépondreSupprimer

Enregistrer un commentaire

Posts les plus consultés de ce blog

A square for three (chess)

Le tripalin se présente

Some strings au cinéma Galeries