This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A066711 #34 Feb 16 2025 08:32:45 %S A066711 9,18,99,189,117,288,117,288,117,288,117,288,117,288,117,288,117,288, %T A066711 117,288,117,288,117,288,117,288,117,288,117,288,117,288,117,288,117, %U A066711 288,117,288,117,288,117,288,117,288,117,288,117,288,117 %N A066711 RATS: Reverse Add Then Sort the digits applied to previous term, starting with 9. %C A066711 a(1) = A114612(1) = 9; A114611(3) = 2. - _Reinhard Zumkeller_, Mar 14 2012 %H A066711 R. K. Guy, <a href="http://www.jstor.org/stable/2325149">Conway's RATS and other reversals</a>, Amer. Math. Monthly, 96 (1989), 425-428. %H A066711 J. Thiel, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL15/Thiel/thiel2.html">Conway’s RATS Sequences in Base 3</a>, Journal of Integer Sequences, 15 (2012), #12.9.2. - _N. J. A. Sloane_, Jan 02 2013 %H A066711 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/RATSSequence.html">RATS Sequence</a> %H A066711 <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (0,1). %F A066711 Let a(n) = k, form m by Reversing the digits of k, Add m to k Then Sort the digits of the sum into increasing order to get a(n+1). %F A066711 Periodic with period 2. %F A066711 a(n+1) = A036839(a(n)). - _Reinhard Zumkeller_, Mar 14 2012 %F A066711 G.f.: x*(-99*x^5 - 18*x^4 - 171*x^3 - 90*x^2 - 18*x - 9)/(x^2 - 1). - _Chai Wah Wu_, Feb 07 2020 %e A066711 668 -> 668 + 866 = 1534 -> 1345. %t A066711 NestList[ FromDigits[ Sort[ IntegerDigits[# + FromDigits[ Reverse[ IntegerDigits[#]]]]]] &, 9, 48] (* _Jayanta Basu_, Aug 13 2013 *) %t A066711 Join[{9, 18, 99, 189},LinearRecurrence[{0, 1},{117, 288},45]] (* _Ray Chandler_, Aug 25 2015 *) %o A066711 (Haskell) %o A066711 a066711_list = iterate a036839 9 -- _Reinhard Zumkeller_, Mar 14 2012 %o A066711 (Python) %o A066711 from itertools import accumulate %o A066711 def rats(anm1, _): %o A066711 return int("".join(sorted(str(anm1 + int(str(anm1)[::-1]))))) %o A066711 print(list(accumulate([9]*49, rats))) # _Michael S. Branicky_, Sep 18 2021 %Y A066711 Cf. A004000, A036839, A066710, A033896, A114611, A114612. %Y A066711 Cf. A004000, A066710, A209878, A209879, A209880. %K A066711 nonn,base %O A066711 1,1 %A A066711 _N. J. A. Sloane_, Jan 19 2002