OFFSET
1,1
COMMENTS
a(n) is smallest m such that 3^m*n is in the sequence A171901 (or -1 if no such m exists).
0 <= a(n) <= 35 for all n > 0. This is proved by showing that for each 0 < n < 10^9, there is a number m <= 35 such that 3^m*n mod 10^9 has adjacent identical digits. If n > 0 and n == 0 mod 10^9, then clearly a(n) = 0.
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..10000
FORMULA
a(A171901(n)) = 0.
EXAMPLE
a(1) = 11 since 3^11 = 177147 has 2 adjacent digits '7' and no smaller power of 3 has adjacent identical digits.
Record values:
a(1) = 11
a(241) = 12
a(2392) = 14
a(35698) = 15
a(267345) = 16
a(893521) = 17
a(29831625) = 18
a(3232453125) = 19
PROG
(Python)
def A306494(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 *= 3
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Chai Wah Wu, Feb 19 2019
STATUS
approved