login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A083828
Let x(n) = 123...n, y(n) = n...321; c(n) = delete the LSD of y(n) and concatenated with x(n); d(n) = delete LSD of x(n) and concatenate with y(n). a(n) = c(n) - d(n).
0
0, 91, 19802, 3086913, 419758024, 53086469135, 6419753580246, 753086424691357, 86419753135802468, -13580245898641975411, -123580236689876419763310, -234580144678997654198553209, 7754320775431099224567922456892
OFFSET
1,2
EXAMPLE
x(3) = 123, y(3) = 321
c(3) = 32123, d(3) = 12321.
a(3) = c(3) - d(3) = 19802.
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((floor(y/10)*10^l + x)-(floor(x/10)*10^l + y)); ); }
CROSSREFS
Cf. A083827.
Sequence in context: A131442 A319370 A116507 * A348088 A157802 A214110
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