OFFSET
1,2
EXAMPLE
x(3) = 123, y(3) = 321, a(3) = 321123-123321=197802.
MATHEMATICA
Module[{nn=20, x, y}, Table[x=Range[n]; y=Reverse[x]; FromDigits[Join[ Flatten[ IntegerDigits/@y], Flatten[IntegerDigits/@x]]]-FromDigits[ Join[ Flatten[ IntegerDigits/@x], Flatten[IntegerDigits/@y]]], {n, nn}]] (* Harvey P. Dale, Aug 02 2012 *)
PROG
(PARI) { for(n=1, 20, if(n==1, x=1; y=1; l=1; ln=1; ln=length(Str(n)); x=x*10^ln+n; y=n*10^l+y; l=l+ln; ); print((y*10^l + x) - (x*10^l + y)); ); }
CROSSREFS
KEYWORD
base,easy,sign
AUTHOR
Amarnath Murthy and Meenakshi Srikanth (menakan_s(AT)yahoo.com), May 09 2003
EXTENSIONS
More terms from Ray Chandler, Jul 23 2003
STATUS
approved