OFFSET
1,2
COMMENTS
a(n) is within 1 of x, where n+1 = x*(1 + log(x)).
LINKS
Seiichi Manyama, Table of n, a(n) for n = 1..10000
FORMULA
a(n) ~ e^(LambertW(e*(n + 1)) - 1). - Mats Granvik, Jan 26 2017
EXAMPLE
a(5) = 3 because 3^(5+1-3) = 27 is larger than k^(5+1-k) for any other k (1 <= k <= n) besides k = 3.
MATHEMATICA
nn = 79; Monitor[a = Table[RankedMax[Table[k^(n + 1 - k), {k, 1, n}], 1], {n, 1, nn}]; , n] Monitor[b = Flatten[Table[Position[Table[k^(n + 1 - k), {k, 1, n}], a[[n]]], {n, 1, nn}]], n] (* Mats Granvik, Jan 26 2017 *)
a[n_] := MaximalBy[Range[n], #^(n + 1 - #)&][[1]];
Array[a, 100] (* Jean-François Alcover, Dec 11 2020 *)
PROG
(PARI) a(n) = my(v = vector(n, k, k^(n+1-k))); vecsort(v, , 1)[#v]; \\ Michel Marcus, Jan 28 2017
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Leroy Quet, Jul 30 2000
STATUS
approved