cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A365452 Largest number whose digits, in some base, sum to n and include no zeros.

Original entry on oeis.org

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

Views

Author

Elliott Line, Sep 04 2023

Keywords

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).

Examples

			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.
		

Crossrefs

Cf. A000225.

Programs

  • 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
  • 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

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

Extensions

More terms from David A. Corneth, Sep 04 2023