|
|
A306305
|
|
Smallest number m such that 2^m*n has 2 or more identical adjacent decimal digits or -1 if no such m exists.
|
|
4
|
|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
a(n) is smallest m such that 2^m*n is in the sequence A171901 (or -1 if no such m exists).
If n is not 0, 1, or 5, then a(n) <= A323832(n).
Conjecture 1: a(n) != -1 for all n > 0.
Conjecture 2: there exists K > 0 such that a(n) <= K for all n. Evidence suggests K = 21.
The above conjectures are true. In particular, 0 <= a(n) <= 21 for all n > 0. This is proved by showing that for each 0 < n < 1000, there is a number m <= 21 such that 2^m*n mod 1000 has adjacent identical digits. If n > 0 and n == 0 mod 1000, then clearly a(n) = 0.
(End)
|
|
LINKS
|
|
|
FORMULA
|
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.
|
|
EXAMPLE
|
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
|
|
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 *= 2
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|