login
A338545
Numbers that escape to infinity when applying this algorithm: if x_i <= rev(x_i) then x_i+1 = rev(x_i) - x_i else x_i+1 = rev(x_i) + x_i.
1
3763, 3853, 3943, 3973, 4492, 4582, 4672, 4762, 4792, 4852, 4882, 4942, 4972, 5194, 5284, 5374, 5464, 5491, 5554, 5581, 5644, 5671, 5734, 5761, 5791, 5824, 5851, 5881, 5914, 5941, 5971, 5993, 6193, 6283, 6373, 6426, 6463, 6490, 6516, 6553
OFFSET
1,1
COMMENTS
All numbers up to 3762 (not already being a palindrome) are mapped sooner or later onto a palindrome and collapse to 0 in the next step of the algorithm. But unlike in the Collatz conjecture (see A006370) where probably all numbers fall back to 1, here most numbers never fall back to 0. Instead, they fall onto repetitive patterns which increase by one order of magnitude every three steps and hence go to infinity. For instance if the algorithm reaches the number 19799999999999991002000000000000088 at step k it will reach 1979999999999999910020000000000000088 at step k+6. And every six steps one 9 is added to the long line of 9's and one 0 is added right of the 2. Up to 100000 there are 3 repetitive patterns, which contain the numbers listed in the second line of the Python code below (escape = [...]).
From the first 1 million numbers, 489806 fall back to zero whereas the other 510194 fall into one of 6 repetitively increasing patterns.
The terms become more and more frequent: up to 10000 they just make 1.78 %, up to 100000 they are 21.88 % and up to 1000000 they are already 51.02 %.
Many numbers (like the 137 in the example below) hit at some point the numbers 8712 and 9801 that are terms of A031877, which is not a coincidence. They fall back to 0.
338545 is a term of this sequence A338545, hence it is also a term of A053873.
EXAMPLE
x_0 = 137, x_1 = 731 - 137 = 594, x_2 = 495 + 594 = 1089, x_3 = 9801 - 1089 = 8712, x_4 = 2178 + 8712 = 10890, x_5 = 9801 + 10890 = 20691, x_6 = 19602 + 20691 = 40293, x_7 = 39204 + 40293 = 79497, x_8 = 79497 - 79497 = 0, hence 137 is not a term.
PROG
(Python)
sequence = []
escape = [1090089, 99100089, 9900109899999990109989]
for k in range(1, 100000):
x = k
while not x==0:
if x <= rev(x):
x = rev(x) - x
else:
x = rev(x) + x
if x in escape:
x = 0
sequence.append(k)
CROSSREFS
Cf. A031877.
Sequence in context: A252564 A137790 A300796 * A284079 A108179 A336584
KEYWORD
nonn,base
AUTHOR
Ruediger Jehn, Nov 02 2020
STATUS
approved