OFFSET
1,2
COMMENTS
Powers of tenth root of 10 rounded up.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
FORMULA
a(n) = ceiling(10^((n-1)/10)).
EXAMPLE
3^10 = 59049 has five digits, 4^10 = 1048576 has seven digits, hence a(6) = a(7) = 4.
MATHEMATICA
Table[(Ceiling[10^((n - 1)/10)]), {n, 1, 60}] (* Vincenzo Librandi, Sep 20 2013 *)
PROG
(Magma) [Ceiling(Root(10^(n-1), 10)): n in [1..51]];
(Python)
from sympy import integer_nthroot
def A130084(n): return (lambda x:x[0]+(not x[1]))(integer_nthroot(10**(n-1), 10)) # Chai Wah Wu, Jun 20 2024
CROSSREFS
Cf. A011279, A011557 (powers of 10), A017936 (smallest number whose square has n digits), A018005 (smallest number whose cube has n digits), A018074 (smallest number whose fourth power has n digits), A018143 (smallest number whose fifth power has n digits), A130080 to A130083 (smallest number whose sixth ... ninth power has n digits).
KEYWORD
nonn,base,easy
AUTHOR
Klaus Brockhaus, May 07 2007
STATUS
approved