A084320 Number of powers of two between 2 consecutive factorials (2! including).
1, 1, 2, 2, 3, 3, 3, 3, 3, 4, 3, 4, 4, 4, 4, 4, 4, 4, 5, 4, 4, 5, 5, 4, 5, 5, 4, 5, 5, 5, 5, 5, 5, 5, 6, 5, 5, 5, 6, 5, 5, 6, 5, 6, 5, 6, 5, 6, 6, 5, 6, 6, 6, 5, 6, 6, 6, 6, 6, 6, 6, 5, 6, 7, 6, 6, 6, 6, 6, 6, 6, 6, 7, 6, 6, 6, 7, 6, 6, 7, 6, 6, 7, 6, 7, 6, 7, 6, 6, 7, 7, 6, 7, 6, 7, 6, 7, 7, 6, 7, 7, 6, 7, 7, 6
Offset: 1
Keywords
Examples
n=7: a(7)=3 because between 5040 and 40320 three powers of 2 occur: 8192, 16384 and 32768.
Links
- Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
Table[Floor[Log[2, (w+1)! ]//N]-Floor[Log[2, w! ]//N], {w, 1, 128}]
-
PARI
a(n)=if(n<6,(n+1)\2,log((n+1)!)\log(2)-log(n!)\log(2)) \\ Charles R Greathouse IV, Dec 26 2013
Formula
a(n) = A000523(n) + O(1). - Charles R Greathouse IV, Dec 26 2013