# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a215884 Showing 1-1 of 1 %I A215884 #17 Jan 03 2023 11:21:17 %S A215884 0,1,1,1,1,0,2,2,2,2,0,2,2,2,2,0,2,2,2,2,0,2,2,2,2,0,1,1,1,1,0,3,3,3, %T A215884 3,0,3,3,3,3,0,3,3,3,3,0,3,3,3,3,0,1,1,1,1,0,3,3,3,3,0,3,3,3,3,0,3,3, %U A215884 3,3,0,3,3,3,3,0,1,1,1,1,0,3,3,3,3,0,3,3,3,3,0,3,3,3,3,0,3,3,3,3,0,1,1,1,1,0,3 %N A215884 Written in base 5, n ends in a(n) consecutive nonzero digits. %C A215884 Sequences A215879, A215883 and A215887 are the base 3, 4 and 10 analogs, while the base 2 analog of this sequence coincides (up to a shift in the index) with the 2-adic valuation A007814, cf. comments there. %H A215884 Harvey P. Dale, Table of n, a(n) for n = 0..1000 %e A215884 The numbers 24,...,31 are written in base 5 as 44,100,101,102,103,104,110,111 and thus end in a string of a(24..31)=2,0,1,1,1,1,0,3 nonzero digits. %t A215884 cnzd[n_]:=Module[{c=Split[If[#>0,1,0]&/@IntegerDigits[n,5]]},If[FreeQ[ c[[-1]],0],Total[c[[-1]]],0]]; Array[cnzd,120,0] (* _Harvey P. Dale_, Jan 03 2023 *) %o A215884 (PARI) a(n,b=5)=n=divrem(n,b); for(c=0,9e9,n[2]||return(c); n=divrem(n[1],b)) %o A215884 (PARI) a(n)=my(k);while(n%5,n\=5;k++);k \\ _Charles R Greathouse IV_, Sep 26 2013 %K A215884 nonn,base %O A215884 0,7 %A A215884 _M. F. Hasler_, Aug 25 2012 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE