OFFSET
0,3
COMMENTS
a(0) = 1 whether we take 0^0 = 1 or 0^0 = 0.
The standard simplification of (n^n)^(n^n) is n^(n^(n+1)). - M. F. Hasler, Oct 15 2019
FORMULA
a(n) = 1 + floor(n^(n+1) * log_10(n)).
a(10^k) = k * 10^(k*(10^k + 1)) + 1. - Jon E. Schoenfield, Sep 29 2019
EXAMPLE
a(10) = 1 + floor(10^(10+1) * log_10(10)) = 1 + floor( 100000000000 * 1) = 100000000001.
a(10^3) = 3*10^3003 + 1.
MATHEMATICA
Table[IntegerLength[(n^n)^(n^n)], {n, 1, 8}] (* Human friendly *)
Table[1 + Floor[n^(n + 1) * Log10[n]], {n, 1, 16}] (* Computationally efficient *)
PROG
(PARI) a(n) = my(x=n^n); 1 + floor(x*log(x)/log(10));
(PARI) A327603(n, L=log(10))=n^(n+1)*log(n)\L+1 \\ Supplying the 2nd arg allows to avoid re-computation of log(10) on each call, and also to get the number of digits in any desired base. - M. F. Hasler, Oct 15 2019
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Natan Arie Consigli, Sep 22 2019
EXTENSIONS
a(9)-a(15) from Nathaniel Johnston, Sep 23 2019
a(13)-a(15) corrected and a(16) appended by Natan Arie Consigli, Sep 25 2019
a(17)-a(18) from Jon E. Schoenfield, Sep 29 2019
STATUS
approved