OFFSET
0,1
LINKS
Eric Weisstein's World of Mathematics, Benford's Law
Eric Weisstein's World of Mathematics, Power Tower
EXAMPLE
a(0) = 3, since 5^(5^(5^0)) = 5^5 = 3125.
a(1) = 1, since 5^(5^(5^1)) = 5^3125 = 191101259...
a(5) = 1, since 5^(5^(5^5)) = 11110288... (see A241294)
MATHEMATICA
f[base_, exp_] := IntegerPart[10^FractionalPart[N[exp*Log10[base], Floor[Log10[exp]] + 3]]];
Table[f[5, 5^(5^n)], {n, 0, 13}]
PROG
(Python)
import mpmath as mp
def a(n):
if n==0:return 3
e=5**n
E=5**e
mp.mp.dps=int(e*mp.log10(5))+40
x=mp.mpf(E)*mp.log10(5)
f=x-mp.floor(x)
return int(mp.floor(mp.power(10, f)))
n=0
while True:
print(f"a({n}) = {a(n)}")
n+=1
CROSSREFS
KEYWORD
nonn,base,more,hard
AUTHOR
Allam Assal, Aug 05 2026
STATUS
approved