|
|
A306494
|
|
Smallest number m such that n*3^m has 2 or more identical adjacent decimal digits.
|
|
2
|
|
|
11, 8, 10, 8, 11, 7, 9, 5, 9, 11, 0, 7, 2, 4, 10, 2, 4, 6, 7, 8, 8, 0, 5, 4, 2, 9, 8, 4, 6, 10, 4, 2, 0, 8, 6, 6, 1, 1, 1, 8, 3, 3, 3, 0, 9, 5, 5, 1, 2, 11, 3, 7, 2, 5, 0, 7, 6, 2, 1, 7, 6, 2, 7, 5, 3, 0, 6, 4, 4, 9, 7, 3, 5, 1, 1, 1, 0, 8, 2, 5, 7, 3, 3, 3, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
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
|
|
|
FORMULA
|
|
|
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)
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
|
|
|
STATUS
|
approved
|
|
|
|