OFFSET
0,2
COMMENTS
a(n) = RATS(n), not RATS(a(n-1)).
Row 10 of A288535. - Andrey Zabolotskiy, Jun 14 2017
LINKS
Indranil Ghosh, Table of n, a(n) for n = 0..50000 (terms 0..1000 from T. D. Noe)
R. K. Guy, Conway's RATS and other reversals, Unsolved Problems Column, American Math. Monthly, Vol. 96, pp. 425-428, May 1989.
Eric Weisstein's World of Mathematics, RATS Sequence
FORMULA
Form m by Reversing the digits of n, Add m to n Then Sort the digits of the sum into increasing order to get a(n).
EXAMPLE
1 -> 1 + 1 = 2, so a(1) = 2; 3 -> 3 + 3 = 6, so a(3) = 6.
MAPLE
read transforms; RATS := n -> digsort(n + digrev(n));
MATHEMATICA
FromDigits[Sort[IntegerDigits[#+FromDigits[Reverse [IntegerDigits[#]]]]]] & /@Range[0, 80] (* Harvey P. Dale, Mar 26 2011 *)
PROG
(Haskell)
a036839 = a004185 . a056964 -- Reinhard Zumkeller, Mar 14 2012
(Python)
def A036839(n):
x = str(n+int(str(n)[::-1]))
return int("".join(sorted(x))) # Indranil Ghosh, Jan 28 2017
CROSSREFS
KEYWORD
AUTHOR
N. J. A. Sloane, Jan 19 2002
STATUS
approved