OFFSET
1,2
COMMENTS
R_n is the n-th repunit (i.e., R_n = 11...111 with n 1's).
From David A. Corneth, Jun 27 2016: (Start)
The number of digits of m is floor(log(m)/log(10)) + 1 for m > 0.
R_n = (10^n - 1) / 9 = (10 - 10^(1-n))/9 * 10^(n-1). Its number of digits is floor(n * log((10 - 10^(1-n))/9) / log(10)) + n * (n - 1) + 1. [corrected by Jason Yuen, Nov 11 2024] (End)
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
FORMULA
MATHEMATICA
Table[IntegerLength[((10^n - 1)/9)^n], {n, 54}] (* or *)
Table[IntegerLength[FromDigits[Table[1, {n}]]^n], {n, 54}] (* Michael De Vlieger, Jun 27 2016 *)
PROG
(PARI) vector(100, n, #Str(((10^n-1)/9)^n))
(PARI) a(n) = logint(((10 - 10^(1-n))/9)^n\1, 10)+n^2-n+1 \\ David A. Corneth, Jun 27 2016
(Magma) [#Intseq(Floor((10^n-1)/9)^n): n in [1..50]]; // Marius A. Burtea, May 20 2019
(Python)
def a(n): return len(str(int("1"*n)**n))
print([a(n) for n in range(1, 55)]) # Michael S. Branicky, Apr 20 2022
CROSSREFS
KEYWORD
nonn,easy,base,changed
AUTHOR
Derek Orr, Sep 25 2014
EXTENSIONS
Incorrect conjectures removed by Georg Fischer, May 19 2019
STATUS
approved