OFFSET
0,4
COMMENTS
The maximum of f(x) = x^(n-x) occurs at x_m(n) that is the solution of x*(1+log(x)) = n. - Bernard Schott, Oct 03 2021
EXAMPLE
a(0) = 0^0 = 1 by convention.
a(1) = 1, because 1^0 = 1, but any x > 0.34632336... (A333318) would make x^(1-x) > 0.5.
a(2) = 1 because the maximum of f(x) = x^(2-x) occurs at x_m = 1.4547332..., f(x_m) = 1.2267621..., round(f(x_m)) = 1.
a(5) = 10: maximum of f(x) = x^(5-x) occurs at x_m = 2.57141358157..., f(x_m) = 9.91146808..., round(f(x_m)) = 10.
MATHEMATICA
Table[First[Round[Maximize[x^(n-x), x, Reals]]], {n, 0, 27}] (* Stefano Spezia, Aug 14 2021 *)
PROG
(PARI) a346999(limit) = {my(d(n, y)=derivnum(x=y, x^(n-x))); print1(0^0, ", "); for(n=1, limit, my(X=solve(x=1, n, d(n, x))); print1(round(X^(n-X)), ", "))};
a346999(27)
CROSSREFS
KEYWORD
nonn
AUTHOR
Hugo Pfoertner, Aug 12 2021
STATUS
approved