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!)
A117804 Natural position of n in the string 12345678910111213.... 36

%I #41 Jun 04 2019 17:08:16

%S 1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,

%T 44,46,48,50,52,54,56,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,

%U 90,92,94,96,98,100,102,104,106,108,110,112,114,116,118,120

%N Natural position of n in the string 12345678910111213....

%C The number of digits necessary to write down all the numbers 0, 1, 2, ..., n-1. Thus, the partial sums of A055642 are given by a(n+1). - _Hieronymus Fischer_, Jun 08 2012

%C From _Daniel Forgues_, Mar 21 2013: (Start)

%C From n = 10^0 + 1 to 10^1: a(n) - a(n-1) = 1 (9 * 10^0 terms);

%C From n = 10^1 + 1 to 10^2: a(n) - a(n-1) = 2 (9 * 10^1 terms);

%C From n = 10^2 + 1 to 10^3: a(n) - a(n-1) = 3 (9 * 10^2 terms);

%C ...

%C From n = 10^k + 1 to 10^(k+1): a(n) - a(n-1) = k+1 (9 * 10^k terms). (End)

%C By the "number of digits" definition, a(n) = 1 + A058183(n-1) for n > 1. - _David Fifield_, Jun 02 2019

%H Hieronymus Fischer, <a href="/A117804/b117804.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = d*n + 1 - (10^d - 1)/9 where d is the number of decimal digits in n, i.e., d = floor(log_10(n)) + 1.

%F From _Hieronymus Fischer_, Jun 08 2012: (Start)

%F a(n) = Sum_{j=0..n-1} A055642(j).

%F a(n) = 1 + A055642(n-1)*n - (10^A055642(n-1)-1)/9.

%F a(n) = 1 + A055642(n)*n - (10^A055642(n)-1)/9.

%F a(10^n) = (9*n-1)*(10^n-1)/9 + n + 1. (This is the total number of digits necessary to write down all the numbers with <= n places.)

%F G.f.: g(x) = x/(1-x) + (x/(1-x)^2)*Sum_{j>=0} x^10^j; corrected by _Ilya Gutkovskiy_, Jan 09 2017 (End)

%e 12 begins at the 14th place in 12345678910111213... (we are ignoring "early bird" occurrences here, cf. A116700), so a(12) = 14.

%e From _Daniel Forgues_, Mar 21 2013: (Start)

%e a(10^1) = 10. (1*10^1 - 0)

%e a(10^2) = 190. (2*10^2 - 10)

%e a(10^3) = 2890. (3*10^3 - 110)

%e a(10^4) = 38890. (4*10^4 - 1110)

%e a(10^5) = 488890. (5*10^5 - 11110)

%e a(10^6) = 5888890. (6*10^6 - 111110)

%e ...

%e a(10^k) = k*10^k - R_k + 1, R_k := k-th repunit (cf. A002275)

%e (the number of digits necessary to write down the numbers 0..10^k-1). (End)

%Y Cf. A116700.

%Y Cf. A055640, A055641, A055642, A102669-A102685.

%K nonn,base

%O 1,2

%A _Warut Roonguthai_, Jul 23 2007

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 25 03:15 EDT 2024. Contains 371964 sequences. (Running on oeis4.)