login
A365452
Largest number whose digits, in some base, sum to n and include no zeros.
1
1, 3, 7, 22, 67, 213, 853, 3413, 13653, 66406, 332031, 1660156, 8734003, 52404019, 314424115, 1886544691, 12193514915, 85354604406, 597482230843, 4182375615902, 31414617936457, 251316943491657, 2010535547933257, 16084284383466057, 135502101309790873, 1219518911788117858
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
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
Cf. A000225.
Sequence in context: A148683 A148684 A148685 * A035353 A242566 A148686
KEYWORD
nonn,base
AUTHOR
Elliott Line, Sep 04 2023
EXTENSIONS
More terms from David A. Corneth, Sep 04 2023
STATUS
approved