OFFSET
0,3
COMMENTS
'Reverse and Subtract' (cf. A072137) is defined by x -> |x - reverse(x)|. For small n the positive terms are the first palindrome in the trajectory of n, so this sequence is a weak analog of A033865, which uses 'Reverse and Add'. a(1012) = 8712 is the first non-palindrome (cf. A072140). For k in A072140, A072141 or A072142 we have a(k) = -1.
EXAMPLE
a(0) = -1, since 0 -> |0 - 0| = 0, the preperiodic part is empty; a(12) = 9, since 12 -> |12 - 21| = 9.
CROSSREFS
KEYWORD
base,easy,sign
AUTHOR
Klaus Brockhaus, Jun 24 2002
STATUS
approved