login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A057138 Add (n mod 10)*10^(n-1) to the previous term, with a(0) = 0. 5

%I #28 Mar 12 2023 14:15:57

%S 0,1,21,321,4321,54321,654321,7654321,87654321,987654321,987654321,

%T 10987654321,210987654321,3210987654321,43210987654321,

%U 543210987654321,6543210987654321,76543210987654321,876543210987654321

%N Add (n mod 10)*10^(n-1) to the previous term, with a(0) = 0.

%C Original definition: "Concatenate next digit at left hand end."

%C 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 left-concatenation of the digit 1! - _M. F. Hasler_, Jan 13 2013

%C From _Hieronymus Fischer_, Jan 23 2013: (Start)

%C A definition which is also consistent is: Start with terms 0 and 1 and then concatenate the next digit at the left hand end. If the next digit is a zero, keep this zero in mind so that the following digit is a 1 preceding a 0.

%C 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 self-explaining. Also, the special behavior when the zero digit is encountered becomes clear.

%C Examples: a(3) = 321 = Reversal(A057137(3)),

%C a(10) = 987654321 = Reversal(A057137(10)) = Reversal(1234567890). (End)

%H Hieronymus Fischer, <a href="/A057138/b057138.txt">Table of n, a(n) for n = 0..200</a>

%F a(n) = a(n-1) + 10^(n-1)*n - 10^n*floor(n/10) = A057139(n) mod 10^n.

%F 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

%F G.f.: x(1-10(10x)^9 + 9(10x)^10)/((1-x) (1-10x)^2 (1-(10x)^10)). - _Robert Israel_, Jun 21 2017

%p ListTools:-PartialSums([seq((k mod 10)*10^(k-1), k=0..40)]); # _Robert Israel_, Jun 21 2017

%t Join[{c = 0}, Table[c = c + Mod[n, 10]*10^(n - 1), {n, 18}]] (* _T. D. Noe_, Jan 30 2013 *)

%o (PARI) a(n)=sum(i=0,n,i%10*10^(i-1)) \\ _M. F. Hasler_, Jan 13 2013

%Y Alternative progression for n >= 10 compared with A000422 and A014925.

%Y Cf. A057137 for reverse.

%K base,easy,nonn

%O 0,3

%A _Henry Bottomley_, Aug 12 2000

%E Better definition from _M. F. Hasler_, Jan 13 2013

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 23:40 EDT 2024. Contains 371798 sequences. (Running on oeis4.)