(Translated by https://www.hiragana.jp/)
A022926 - OEIS
login
A022926
Number of powers of 7 between 2^n and 2^(n+1).
0
0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1
OFFSET
0,1
FORMULA
a(n) = floor(log_7 2^(n + 1)) - floor(log_7 2^n). - Alonso del Arte, Nov 04 2018
EXAMPLE
Between 2^2 and 2^3 there is only one power of 7, which is 7 itself. Hence a(2) = 1.
Between 2^3 and 2^4 there are no powers of 7, so a(3) = 0.
MATHEMATICA
Table[Floor[Log[7, 2^(n + 1)]] - Floor[Log[7, 2^n]], {n, 0, 127}] (* Alonso del Arte, Nov 04 2018 *)
PROG
(PARI) logint(2^(n+1), 7)-logint(2^n, 7) \\ Charles R Greathouse IV, Jan 16 2017
(Magma) [Floor(Log(7, 2^(n+1))) - Floor(Log(7, 2^n)): n in [0..100]]; // Vincenzo Librandi, Nov 05 2018
CROSSREFS
Sequence in context: A022003 A353514 A144604 * A288520 A285177 A144595
KEYWORD
nonn
EXTENSIONS
Definition clarified by Alonso del Arte, Nov 04 2018
STATUS
approved