cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A306305 Smallest number m such that 2^m*n has 2 or more identical adjacent decimal digits or -1 if no such m exists.

This page as a plain text file.
%I A306305 #56 Feb 20 2019 21:05:12
%S A306305 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,
%T A306305 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,
%U A306305 10,1,4,4,10,8,0,5,3,3,4,4,1,4,4,2,10,0,6,7,13
%N A306305 Smallest number m such that 2^m*n has 2 or more identical adjacent decimal digits or -1 if no such m exists.
%C A306305 a(n) is smallest m such that 2^m*n is in the sequence A171901 (or -1 if no such m exists).
%C A306305 If n is not 0, 1, or 5, then a(n) <= A323832(n).
%C A306305 Conjecture 1: a(n) != -1 for all n > 0.
%C A306305 Conjecture 2: there exists K > 0 such that a(n) <= K for all n. Evidence suggests K = 21.
%C A306305 From _Chai Wah Wu_, Feb 19 2019 : (Start)
%C A306305 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.
%C A306305 (End)
%H A306305 Chai Wah Wu, <a href="/A306305/b306305.txt">Table of n, a(n) for n = 1..10000</a>
%F A306305 a(A171901(n)) = 0.
%F A306305 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.
%e A306305 a(1) = 16 since 2^16 = 65536 has 2 adjacent digits '5' and no smaller power of 2 has adjacent identical digits.
%e A306305 Record values:
%e A306305 a(1) = 16
%e A306305 a(5) = 17
%e A306305 a(15913) = 19
%e A306305 a(79565) = 20
%e A306305 a(6703845) = 21
%o A306305 (Python)
%o A306305 def A306305(n):
%o A306305     m, k = 0, n
%o A306305     while True:
%o A306305         s = str(k)
%o A306305         for i in range(1,len(s)):
%o A306305             if s[i] == s[i-1]:
%o A306305                 return m
%o A306305         m += 1
%o A306305         k *= 2
%Y A306305 Cf. A171901, A323832.
%K A306305 nonn,base
%O A306305 1,1
%A A306305 _Chai Wah Wu_, Feb 14 2019