|
|
A036839
|
|
RATS(n): Reverse Add Then Sort the digits.
|
|
24
|
|
|
0, 2, 4, 6, 8, 1, 12, 14, 16, 18, 11, 22, 33, 44, 55, 66, 77, 88, 99, 11, 22, 33, 44, 55, 66, 77, 88, 99, 11, 112, 33, 44, 55, 66, 77, 88, 99, 11, 112, 123, 44, 55, 66, 77, 88, 99, 11, 112, 123, 134, 55, 66, 77, 88, 99, 11, 112, 123, 134, 145, 66, 77
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
COMMENTS
|
a(n) = RATS(n), not RATS(a(n-1)).
|
|
LINKS
|
|
|
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)
(Python)
x = str(n+int(str(n)[::-1]))
|
|
CROSSREFS
|
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|