A365452 Largest number whose digits, in some base, sum to n and include no zeros.
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
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.
Links
- Alois P. Heinz, Table of n, a(n) for n = 1..597
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
Comments