A306305 Smallest number m such that 2^m*n has 2 or more identical adjacent decimal digits or -1 if no such m exists.
16, 15, 11, 14, 17, 10, 4, 13, 4, 16, 0, 9, 7, 3, 12, 12, 5, 3, 12, 15, 4, 0, 7, 8, 2, 6, 11, 2, 2, 11, 5, 11, 0, 4, 5, 2, 5, 11, 7, 14, 9, 3, 3, 0, 5, 6, 2, 7, 8, 1, 9, 5, 6, 10, 0, 1, 1, 1, 1, 10, 1, 4, 4, 10, 8, 0, 5, 3, 3, 4, 4, 1, 4, 4, 2, 10, 0, 6, 7, 13
Offset: 1
Examples
a(1) = 16 since 2^16 = 65536 has 2 adjacent digits '5' and no smaller power of 2 has adjacent identical digits. Record values: a(1) = 16 a(5) = 17 a(15913) = 19 a(79565) = 20 a(6703845) = 21
Links
- Chai Wah Wu, Table of n, a(n) for n = 1..10000
Programs
-
Python
def A306305(n): m, k = 0, n while True: s = str(k) for i in range(1,len(s)): if s[i] == s[i-1]: return m m += 1 k *= 2
Formula
a(A171901(n)) = 0.
If n is not a multiple of 5, then a(5*n) is either 0 or a(n) + 1. This is because 2*(5*n) = 10*n is just n appended with a 0 and has a similar trajectory under successive doubling.
Comments