The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.



(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A167520 Positions of nonzero digits in this sequence, when all terms are concatenated. 10


%S 1,2,3,4,5,6,7,8,9,10,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,

%T 28,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,48,49,50,51,52,

%U 53,54,55,56,57,58,59,60,61,62,63,64,65,66,68,69,70,71,72,73,74,75,76

%N Positions of nonzero digits in this sequence, when all terms are concatenated.

%C Numbers are written in base 10 in the usual way; the terms give the positions of the nonzero digits when all terms are concatenated.

%C The sequence starts at index 1 since it is a list. The sequence cannot start with a(1)=0, this would mean that the first nonzero digit occurs at position 0, which does not make sense, or at best is a contradiction. Thus we cannot number the positions starting from zero, and the first digit (most significant digit of the first term) is necessarily nonzero, i.e. a(1)=1.

%e The term which follows a(1)=1 (cf. comment) will be nonzero and thus have a nonzero most significant digit, which is the digit that comes right after the initial 1, thus digit # 2 is nonzero, therefore a(2)=2.

%e This goes on the like up to a(10)=10 (this refers to the most significant digit of the 10th term, which is necessarily nonzero). But the first digit of this "10" is followed by the digit '0', so the next nonzero digit is not at position 11, but it will come in the following position, a(11)=12.

%e From here on, there is always an increasing number of subsequent digits already written down, and it is sufficient to list the positions of the digits different from '0'.

%o (PARI) base(n,b=10) = { local( a=[ n%b ]); while( 0<n\=b, a=concat( n%b, a )); a }

%o a=b=[]; for(n=1,99, #b >= n & for( i=a[n-1]+1,#b, b[i] & (a=concat(a,i)) & break); #a<n & a=concat(a,#b+1); b=concat(b,base( a[n] ))); a

%Y Cf. A167500 and A167502 (analog for base 2).

%K base,nonn

%O 1,2

%A _M. F. Hasler_, Nov 05 2009

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 25 06:20 EDT 2021. Contains 345452 sequences. (Running on oeis4.)