OFFSET
0,4
COMMENTS
The best approximation can be smaller or larger than n!; that is, minimize abs(n!-r^s).
EXAMPLE
a(4) = 3, since 3^3 - 3 = 24 = 4! (note 5^2-1 = 24 is not allowed because 2 < 5).
a(7) = 944, since 4^6 + 944 = 5040 = 7! and there is no closer approximation.
CROSSREFS
KEYWORD
sign
AUTHOR
Sean A. Irvine, Mar 26 2021
STATUS
approved