Your friend Sam gives you this sequence.
"What is the next term?" he asks.
"I will say that the next term is , because the value of ," you reply.
"Yes, that is one answer," Sam concedes. "But what if I told you that the sequence is
"What, then, is the next term?"
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
A hint lies in the title: RATS actually stands for R everse, A dd, T hen S ort. We obtain this procedure:
1 : Reverse the digits of the term (i.e. 1 0 a + b becomes 1 0 b + a ). If the term is a single digit, then skip this step.
2 : Add the term and the transformed term together (i.e. ( 1 0 a + b ) + ( 1 0 b + a ) = 1 0 ( a + b ) + ( a + b ) ). You may recognize this as an iterative algorithm for obtaining palindromes.
3 : Sort the digits from least to greatest, and write them down, from left to right (i.e. 1 6 5 = 1 0 0 ( 1 ) + 1 0 ( 6 ) + 1 ( 5 ) ; 1 < 5 < 6 ; 1 6 5 → 1 5 6 ).