cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A061785 a(n) = m such that 2^m < 5^n < 2^(m+1).

Original entry on oeis.org

2, 4, 6, 9, 11, 13, 16, 18, 20, 23, 25, 27, 30, 32, 34, 37, 39, 41, 44, 46, 48, 51, 53, 55, 58, 60, 62, 65, 67, 69, 71, 74, 76, 78, 81, 83, 85, 88, 90, 92, 95, 97, 99, 102, 104, 106, 109, 111, 113, 116, 118, 120, 123, 125, 127, 130, 132, 134, 136, 139, 141, 143, 146, 148
Offset: 1

Views

Author

Lekraj Beedassy, May 09 2003

Keywords

Comments

The Beatty sequence for log_2(5) (A020858). The asymptotic density of this sequence is log_5(2) (A152675). - Amiram Eldar, Apr 09 2021
One less than the length of 5^n written in binary. Could and should be extended to a(0) = 0 (with definition corrected to "2^m <= ..."). - M. F. Hasler, Apr 17 2024

Examples

			a(2) = 4 since 2^4 < 5^2 < 2^(4+1).
		

Crossrefs

Cf. A118738 (Hamming weight of 5^n).

Programs

  • Mathematica
    Table[Floor[n*Log2[5]], {n, 100}] (* Amiram Eldar, Apr 09 2021 *)
  • PARI
    a(n) = floor(n*log(5)/log(2)) \\ Michel Marcus, Jul 27 2013
    
  • Python
    def A061785(n): return (5**n).bit_length()-1 # Chai Wah Wu, Jul 22 2025

Formula

a(n) = floor(n*log_2(5)). - M. F. Hasler, Apr 17 2024

Extensions

Corrected and extended by John W. Layman, May 09 2003