OFFSET
1,2
COMMENTS
There is a proviso with this: the first digit must be one less than the base; otherwise we could claim that a number was in an arbitrarily large base.
The maximum value will always be found by following the initial digit with a string of 1s, which is n candidate values for a(n).
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..597
FORMULA
a(n) >= A000225(n). - David A. Corneth, Sep 04 2023
a(n) = max_{i=1..n} ((i+1)^(n-i)*(1/i+i)-1/i). - Alois P. Heinz, Sep 09 2023
EXAMPLE
For n=5, the candidate digits are 11111_2, 2111_3, 311_4, 41_5 and 5_6. These have decimal values 31, 67, 53, 21 and 5, respectively and the largest of is 67, so a(5)=67.
MAPLE
a:= n-> max((i+1)^(n-i)*(1/i+i)-1/i$i=1..n):
seq(a(n), n=1..25); # Alois P. Heinz, Sep 06 2023
PROG
(PARI) a(n) = {my(res=2^n-1, v = vector(n, i, 1)); for(i = 2, n, v[i] += v[i-1]; v[i-1] = 0; res = max(res, fromdigits(v, i+1))); res} \\ David A. Corneth, Sep 04 2023
(Python)
def A365452(n): return max(((i + 1)**(n-i)*(i**2 + 1) - 1)//i for i in range(1, n+1)) # Chai Wah Wu, Oct 01 2023
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Elliott Line, Sep 04 2023
EXTENSIONS
More terms from David A. Corneth, Sep 04 2023
STATUS
approved