login
This site is supported by donations to The OEIS Foundation.

 

Logo

Please make a donation to keep the OEIS running. We are now in our 55th year. In the past year we added 12000 new sequences and reached 8000 citations (which often say "discovered thanks to the OEIS"). We need to raise money to hire someone to manage submissions, which would reduce the load on our editors and speed up editing.
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A245491 The least x > 0 such that x < the number of zero digits in the base-n expansions of the numbers 1 through x. 1

%I

%S 9,87,1068,16022,284704,5834024,135430302,3511116537,100559404366,

%T 3152738985032,107400330425888,3950024143546665,155996847068247395,

%U 6584073072068125453,295764262988176583800,14088968131538370019982,709394716006812244474473

%N The least x > 0 such that x < the number of zero digits in the base-n expansions of the numbers 1 through x.

%C If the function zeros(n,b) returns the number of zeros in the numbers 1 through n in base b, then:

%C zeros(2,2) = zeros_in(10) = 1.

%C zeros(4,2) = zeros_in(10,100) = 3.

%C zeros(5,2) = zeros_in(10,100,101) = 4.

%C zeros(6,2) = zeros_in(10,100,101,110) = 5.

%C zeros(8,2) = zeros_in(10,100,101,110,1000) = 8.

%C zeros(9,2) = zeros_in(10,100,101,110,1000,1001) = 10.

%C Therefore 9 < zeros(9,2) and 9 is the first entry in the list.

%H Anthony Sand, <a href="/A245491/b245491.txt">Table of n, a(n) for n = 2..100</a>

%e 9 < zero(9,base=2) = 10.

%e 87 < zero(87,3) = 88.

%e 1068 < zero(1068,4) = 1069.

%e 100559404366 < zero(100559404366,10) = 100559404367.

%t a245491[n_Integer] := Module[{x = 0, z = 0},

%t While[x >= z, x++; z += Count[IntegerDigits[x, n], 0]]; x]; Map[a245491, Range[2, 12]] (* _Michael De Vlieger_, Aug 06 2014 *)

%o (PARI) /* formula for calculating n such that zero(n) > n, zero(n-1) <= (n-1) */

%o {estimate(x,b) = m1=b; est=x\b; nn=est; while(nn>0, d=nn%b; m2 = nn\b; if(d==0, est+=(x%m1)+1; if(m2>0, m2--)); est+=m1*m2; m1*=b; nn=nn\b); return(est)}

%o {bmin=2; bmx=20; for(bs=bmin,bmx, ni=bs^bs; n=bs+1; ez1=0; ez2=0; until(ez1>n && ez2<=n-1, ez = estimate(n,bs); if(n>=ez, n+=ni, n-=ni; if(ni>1, ni=ni\bs)); ez1 = estimate(n,bs); ez2 = estimate(n-1,bs)); print1(n,", ")) } \\ _Anthony Sand_, Aug 11 2014

%Y Cf. A164935.

%K nonn,base

%O 2,1

%A _Anthony Sand_, Jul 24 2014

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 December 6 21:48 EST 2019. Contains 329809 sequences. (Running on oeis4.)