OFFSET
1,2
COMMENTS
a(n) is near the (n-1)th power of 2, the difference is A085355.
LINKS
Kevin Ryde, Table of n, a(n) for n = 1..750
Kevin Ryde, C Code
FORMULA
a(n) = minimum x for which floor(log_2((x+1)!)) - floor(log_2(x!)) = n.
a(n) = minimum x for which A084320(x) = n.
EXAMPLE
a(3)=5 since between 5!=120 and 6!=720 is the first time 3 powers of 2 arise, namely, 128, 256 and 512.
MATHEMATICA
LogBase2Stirling[n_] := N[ Log[2, 2 Pi n]/2 + n*Log[2, n/E] + Log[2, 1 + 1/(12n) + 1/(288n^2) - 139/(51840n^3) - 571/(2488320n^4) + 163879/(209018880n^5)], 64]; k = 1; Do[ While[ Floor[ LogBase2Stirling[k + 1]] - Floor[ LogBase2Stirling[k]] < n, k++ ]; Print[k], {n, 1, 33}]
PROG
(C) /* See links */
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Jun 19 2003
EXTENSIONS
Edited and extended by Robert G. Wilson v, Jun 24 2003
Definition clarified by Jianing Song, Aug 08 2022
a(26) corrected by Kevin Ryde, Apr 25 2024
STATUS
approved