cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

This page as a plain text file.
%I A167520 #6 Mar 14 2015 01:04:40
%S A167520 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 A167520 28,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,48,49,50,51,52,
%U A167520 53,54,55,56,57,58,59,60,61,62,63,64,65,66,68,69,70,71,72,73,74,75,76
%N A167520 Positions of nonzero digits in this sequence, when all terms are concatenated.
%C A167520 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 A167520 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 A167520 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 A167520 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 A167520 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 A167520 (PARI) base(n,b=10) = { local( a=[ n%b ]); while( 0<n\=b, a=concat( n%b, a )); a }
%o A167520 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 A167520 Cf. A167500 and A167502 (analog for base 2).
%K A167520 base,nonn
%O A167520 1,2
%A A167520 _M. F. Hasler_, Nov 05 2009