OFFSET
2,2
COMMENTS
1 begins with "1" in all bases, 2 begins with "1" only in binary ("10" in base 2), 3 begins with "1" in two bases ("11" in base 2, "10" in base 3), etc.
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 2..10000
FORMULA
a(n) = n/2 + O(sqrt(n)). - Charles R Greathouse IV, Sep 07 2012
MATHEMATICA
Table[Length[Select[Range[2, n], IntegerDigits[n, #][[1]] == 1 &]], {n, 2, 100}] (* T. D. Noe, Sep 07 2012 *)
PROG
(PARI) a(n)=my(t=1, s, i); for(i=1, log(n)\log(2)+1, s+=floor((n+.5)^(1/i))-floor(((n+.2)/2)^(1/i))); s \\ Charles R Greathouse IV, Sep 07 2012
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Will Nicholes, Sep 07 2012
STATUS
approved