%I #27 Jun 11 2026 18:24:12
%S 1,4,81,16384,1953125,2176782336,4747561509943,18014398509481984,
%T 109418989131512359209,10000000000000000000000000,
%U 144209936106499234037676064081,34182189187166852111368841966125056,972786042517719014174576083150881262357,500026926136478545004035990584179037499817984
%N a(n) is the largest integer of the form r^k (with 0 < r < n and k > 0) whose base-n digital root is r, and whose number of digits in base-n is k.
%e a(2) = 1: the only solution is 1 (base 2: "1", r=1, k=1).
%e a(3) = 4: the solutions are 1, 2, and 4. The maximum is 4 (base 3: "11", r=2, k=2).
%e a(4) = 81: the solutions are 1, 2, 3, 9, 27, and 81. The maximum is 81 (base 4: "1101", r=3, k=4).
%e a(10) = 109418989131512359209: this is the maximum value found in base 10, corresponding to 9^21.
%o (Python)
%o import numpy as np
%o def f(n, b):
%o if n == 0: return 1
%o d = []
%o t = abs(n)
%o while t > 0:
%o d.append(t % b)
%o t //= b
%o return len(d)
%o def r(n, b):
%o if n == 0: return 0
%o return 1 + ((n - 1) % (b - 1))
%o def s(m=19):
%o o = []
%o for b in range(2, m + 1):
%o v = [1]
%o for i in range(2, b):
%o k_max = int(np.floor(1 / (1 - (np.log(i) / np.log(b)))))
%o for k in range(1, k_max + 1):
%o n = int(i**k)
%o if f(n, b) == k and r(n, b) == i:
%o v.append(n)
%o o.append(str(max(v)))
%o print(", ".join(o))
%o s(19)
%Y Cf. A394570.
%K nonn,base
%O 2,2
%A _Ali Sidheek_, Jun 05 2026