A385827 a(n) is the unique k such that 2^k is closest to 5^n.
0, 2, 5, 7, 9, 12, 14, 16, 18, 21, 23, 25, 28, 30, 32, 35, 37, 39, 42, 44, 46, 49, 51, 53, 56, 58, 60, 63, 65, 67, 70, 72, 74, 77, 79, 81, 84, 86, 88, 90, 93, 95, 97, 100, 102, 104, 107, 109, 111, 114, 116, 118, 121, 123, 125, 128, 130, 132, 135, 137, 139, 142, 144, 146, 149
Offset: 0
Examples
a(3) = 7 because 2^7 = 128 is the closest power of 2 to 5^3 = 125.
Links
- A. Gorman-Huang and E. Marks, Approximating Powers of 2 Using Powers of 3 and Break Point Rounding, Girls' Angle Bulletin, Vol. 18, No. 5 (2025), 8-10.
Programs
-
Mathematica
a[n_]:=-Floor[-n*Log2[5] + Log2[3/2]]; Array[a,65,0] (* Stefano Spezia, Jul 17 2025 *)
-
Python
def A385827(n): if n == 0: return 0 k = 5**n m = k.bit_length()-2 return m+1+(k>3<
Chai Wah Wu, Jul 22 2025
Formula
a(n) = -floor(-n*log_2(5) + log_2(3/2)).
Comments