OFFSET
0,5
COMMENTS
For n = 2, there is not a unique maximum because 2^0 = 1^1; we choose j = 0. - T. D. Noe, Apr 08 2014
LINKS
T. D. Noe, Table of n, a(n) for n = 0..1000
EXAMPLE
If the sum is 5, the powers are: 0^5, 1^4, 2^3, 3^2, 4^1 and 5^0. The highest is 3^2 so a(5) = 2.
MATHEMATICA
Join[{0, 0}, Table[SortBy[{#[[1]], #[[2]], #[[1]]^#[[2]]}&/@Flatten[ Permutations /@ IntegerPartitions[n, {2}], 1], Last][[-1, 2]], {n, 3, 80}]] (* Harvey P. Dale, Sep 01 2013 *)
Join[{0, 0, 0}, Flatten[Table[s = Table[(n - k)^k, {k, n}]; Position[s, Max[s]], {n, 3, 80}]]] (* T. D. Noe, Apr 08 2014 *)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Sébastien Dumortier, Jan 15 2007
EXTENSIONS
a(0) added by T. D. Noe, Apr 08 2014
STATUS
approved