OFFSET
1,1
COMMENTS
There are values of n that apparently grow without bounds under repeated application of this map beginning with 10598, 10698, 10798, 10898, 11588, 11688, 11788, 11888, 11999, ... - Ray Chandler, Oct 10 2017
LINKS
Ray Chandler, Table of n, a(n) for n = 1..5000
EXAMPLE
119 is a member because
119 + 911 = 1030 (since the difference is negative),
1030 - 0301 = 729 (since the difference is positive),
729 + 927 = 1656,
1656 + 6561 = 8217,
8217 - 7128 = 1089,
1089 + 9801 = 10890,
10890 - 09801 = 1089, so the terms are cyclic.
MATHEMATICA
With[{nn = 400}, Select[Range@ nn, LengthWhile[NestList[If[#1 < 0, #2, #1] & @@ {#1 - #2, #1 + #2} & @@ {#, IntegerReverse@ #} &, #1, #2], # > 0 &] == #2 + 1 & @@ {#, 2^Log2@ #} &]] (* Michael De Vlieger, Oct 10 2017 *)
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Sébastien Dumortier, Nov 05 2006
EXTENSIONS
Definition clarified by Ray Chandler, Oct 10 2017
STATUS
approved