OFFSET
1,1
COMMENTS
Conjectures from Robert G. Wilson v, Aug 29 2012: (Start)
Limit_{n->oo} a(2n)/10^n = 1 - 1/sqrt(10).
Limit_{n->oo} a(2n-1)/10^n = 1/sqrt(10) - 1/10. (End)
These follow from the Formula. - Robert Israel, Apr 29 2020
Limit_{n->oo} a(n)/a(n-1) = sqrt(10). - Bernard Schott, Jan 21 2023
LINKS
Robert Israel, Table of n, a(n) for n = 1..1000
Karl-Heinz Hofmann, Python program
FORMULA
a(n) = Sum_{y=2..floor(n*log_2(10))} (ceiling(10^(n/y)) - ceiling(10^((n-1)/y))) for n >= 2. - Robert Israel, Apr 29 2020
EXAMPLE
a(1) = 3 because there are 3 powers with 1 digit: 2^2, 2^3 and 3^2.
MAPLE
f:= proc(n) local y;
add(ceil(10^(n/y))-ceil(10^((n-1)/y)), y=2..floor(n*log[2](10)))
end proc:
f(1):= 3:
map(f, [$1..20]); # Robert Israel, Apr 29 2020
PROG
(Python) # see link
(Python)
from sympy import integer_nthroot, integer_log
def A060298(n):
if n == 1: return 3
c, y, a, b, t = 0, 2, 10**n-1, 10**(n-1)-1, (10**n).bit_length()
while y<t:
c += (m:=integer_nthroot(a, y)[0])-(k:=integer_nthroot(b, y)[0])
y = (integer_log(b, k)[0] if m==k else y)+1
return c # Chai Wah Wu, Oct 16 2023
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Michel ten Voorde, Apr 10 2001
EXTENSIONS
a(10)-a(18) from Donovan Johnson, Dec 14 2009
a(19)-a(27) from Donovan Johnson, Aug 29 2012
STATUS
approved