login
Value of r in best integer approximation r^s to n! with s >= r.
4

%I #6 Mar 27 2021 23:50:56

%S 1,1,1,2,3,2,3,4,6,5,4,7,2,5,3,4,5,11,3,6,2,11,4,3,2,14,5,12,4,14,9,

%T 18,11,17,5,24,8,12,25,28,11,26,19,14,27,12,18,5,2,34,22,32,26,9,17,

%U 29,23,12,43,6,47,4,16,32,16,4,16,30,9,12,57,37,29,28

%N Value of r in best integer approximation r^s to n! with s >= r.

%C The best approximation can be smaller or larger than n!; that is, minimize abs(n!-r^s).

%C In the case of a tie, choose the smallest possible s (for example, when n=3, n!=6, we have 2^2 <= 6 <= 2^3 equally distant, choose 2^2).

%H Sean A. Irvine, <a href="https://github.com/archmageirvine/joeis/blob/master/src/irvine/oeis/a342/A342847.java">Java program</a> (github)

%e a(4) = 3, since 3^3 - 3 = 24 = 4! (note 5^2-1 = 24 is not allowed because 2 < 5).

%e a(7) = 4, since 4^6 + 944 = 5040 = 7! and there is no closer approximation.

%Y Cf. A342848, A342849, A045772, A045773.

%K nonn

%O 0,4

%A _Sean A. Irvine_, Mar 26 2021