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.
%I A363873 #25 Aug 06 2023 01:42:02 %S A363873 4,8,5,12,9,6,46,13,53,10,50,7,17,47,77,14,34,54,84,11,31,51,61,81,8, %T A363873 18,38,48,68,78,98,15,25,35,45,55,75,85,95,12,22,32,42,145,52,62,72, %U A363873 82,92,102,9,19,29,39,142,49,59,162,69,79,89,192,99,109,16,119,26,36,139,46 %N A363873 Least k such that 2^k begins with n but is not exactly n. %C A363873 This is not an injective function. a(2) = a(25) = 8. %C A363873 a(n) > 3. %e A363873 a(1) = 4 since 2^4 = 16 starts with 1 and is not 1 itself (the way 2^0 = 1 would be); %e A363873 a(2) = 8 (not 1: 2^1 = 2) since 2^8 = 256; %e A363873 a(3) = 5 since 2^5 = 32; %e A363873 a(4) = 12 (not 2: 2^2 = 4) since 2^12 = 4096; %e A363873 a(5) = 9 since 2^9 = 512; etc. %t A363873 a[n_] := Block[{j = IntegerLength@ n, k = 1}, While[ IntegerLength[2^k] < j || Quotient[2^k, 10^(IntegerLength[2^k] - j)] != n || n == 2^k, k++]; k]; Array[ a, 70] %o A363873 (Python) %o A363873 def A363873(n): %o A363873 m, s = 1<<(k:=n.bit_length()-1), str(n) %o A363873 while m<=n or not str(m).startswith(s): %o A363873 k += 1 %o A363873 m <<= 1 %o A363873 return k # _Chai Wah Wu_, Aug 06 2023 %Y A363873 Cf. A000079, A018856. %K A363873 nonn,base %O A363873 1,1 %A A363873 _Robert G. Wilson v_, Jul 03 2023