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.

A215887 Written in decimal, n ends in a(n) consecutive nonzero digits.

This page as a plain text file.
%I A215887 #33 Nov 25 2020 21:29:48
%S A215887 0,1,1,1,1,1,1,1,1,1,0,2,2,2,2,2,2,2,2,2,0,2,2,2,2,2,2,2,2,2,0,2,2,2,
%T A215887 2,2,2,2,2,2,0,2,2,2,2,2,2,2,2,2,0,2,2,2,2,2,2,2,2,2,0,2,2,2,2,2,2,2,
%U A215887 2,2,0,2,2,2,2,2,2,2,2,2,0,2,2,2,2,2,2,2,2,2,0,2,2,2,2,2,2,2,2,2,0,1,1,1,1,1,1,1,1,1,0,3,3,3,3,3,3,3,3,3,0
%N A215887 Written in decimal, n ends in a(n) consecutive nonzero digits.
%C A215887 Sequences A215879, A215883 and A215884 are the base 3, 4 and 5 analogs, while the base 2 analog of this sequence coincides (up to a shift in the index) with the 2-adic valuation A007814, see comments there.
%C A215887 Starting indexing with k=0 for the rightmost digit, a(n) gives the index of the least significant zero in the decimal representation of n. This may also be the index of the leading zero if there are no zeros in the number itself (A052382). - _Antti Karttunen_, Dec 07 2017
%C A215887 First occurrence of k is A002275(k). - _Robert G. Wilson v_, Dec 07 2017
%H A215887 Antti Karttunen, <a href="/A215887/b215887.txt">Table of n, a(n) for n = 0..11111</a>
%e A215887 Numbers which are multiples of 10 have no nonzero digit at their (right) end, thus a(10*k) = 0.
%e A215887 If numbers are congruent to 1,...,9 mod 100, then they end in a nonzero digit, but do not have more than 1 concatenated nonzero digits at their right end: Thus, a(100k+m)=1 for 0 < m < 10.
%e A215887 In the same way, a(k*10^(e+1)+m) = e if 10^e > m > 10^(e-1).
%t A215887 Table[Which[Divisible[n,10],0,FreeQ[IntegerDigits[n],0], IntegerLength[ n], True, Position[ Reverse[ IntegerDigits[n]],0]-1],{n,0,110}] // Flatten (* _Harvey P. Dale_, Sep 05 2017 *)
%t A215887 f[n_] := Block[{c = 0, m = n}, While[Mod[m, 10] > 0, m = Floor[m/10]; c++]; c]; Array[f, 105, 0] (* _Robert G. Wilson v_, Dec 07 2017 *)
%o A215887 (PARI) a(n,b=10)= n=divrem(n,b); for(c=0,9e9, n[2] || return(c); n=divrem(n[1],b))
%o A215887 (PARI) a(n)=my(k);while(n%10, n\=10; k++); k \\ _Charles R Greathouse IV_, Sep 26 2013
%Y A215887 Cf. A002275, A052382, A339012 (factorial base).
%K A215887 nonn,base,easy
%O A215887 0,12
%A A215887 _M. F. Hasler_, Aug 25 2012
%E A215887 More terms from _Antti Karttunen_, Dec 07 2017