

A057138


Add (n mod 10)*10^(n1) to the previous term, with a(0) = 0.


5



0, 1, 21, 321, 4321, 54321, 654321, 7654321, 87654321, 987654321, 987654321, 10987654321, 210987654321, 3210987654321, 43210987654321, 543210987654321, 6543210987654321, 76543210987654321, 876543210987654321
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,3


COMMENTS

Original definition: "Concatenate next digit at left hand end."
This is misleading, since the concatenation of 0 yields the same term (leading zeros vanish), but upon the next concatenation of 1, the 0 reappears  except for a(1), which according to that description should equal a(1)=10: It is surprising that in this only case where the 0 is indeed present, it disappears upon leftconcatenation of the digit 1!  M. F. Hasler, Jan 13 2013
From Hieronymus Fischer, Jan 23 2013: (Start)
A definition which is also consistent is: Start with terms 0 and 1 and then concatenate the next digit at left hand end. If the next digit is a zero, keep this zero in mind so that the then following digit is a 1 preceding a 0.
The sequence terms are the terms of A057137 in reversed digit order. Based on this understanding, the anomaly for the indices 0 and 1 where the terms are 0 and 1 instead of 0 and 10 (what one would expect) becomes selfexplaining. Also, the special behavior when the zero digit is encountered becomes clear.
Examples: a(3) = 321 = Reversal(A057137(3)),
a(10) = 987654321 = Reversal(A057137(10)) = Reversal(1234567890). (End)


LINKS

Hieronymus Fischer, Table of n, a(n) for n = 0..200


FORMULA

a(n) = a(n1) + 10^(n1)*n  10^n*floor(n/10) = A057139(n) mod 10^n.
a(n) = floor(((q/(10^10  1)) + q mod 10^(n mod 10))*10^(10*floor(n/10))), where q = 987654321.  Hieronymus Fischer, Jan 03 2013
G.f.: x(110(10x)^9 + 9(10x)^10)/((1x) (110x)^2 (1(10x)^10)).  Robert Israel, Jun 21 2017


MAPLE

ListTools:PartialSums([seq((k mod 10)*10^(k1), k=0..40)]); # Robert Israel, Jun 21 2017


MATHEMATICA

Join[{c = 0}, Table[c = c + Mod[n, 10]*10^(n  1), {n, 18}]] (* T. D. Noe, Jan 30 2013 *)


PROG

(PARI) a(n)=sum(i=0, n, i%10*10^(i1)) \\ M. F. Hasler, Jan 13 2013


CROSSREFS

Alternative progression for n >= 10 compared with A000422 and A014925. Cf. A057137 for reverse.
Sequence in context: A113531 A069572 A260487 * A104759 A138793 A014925
Adjacent sequences: A057135 A057136 A057137 * A057139 A057140 A057141


KEYWORD

base,easy,nonn


AUTHOR

Henry Bottomley, Aug 12 2000


EXTENSIONS

Better definition from M. F. Hasler, Jan 13 2013


STATUS

approved



