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 A004287 #29 Jan 31 2024 16:48:08 %S A004287 1,11,111,11,101,111111,10,11,1011,101,10011,111111,1011,110,11001, %T A004287 1111,100111,1101111,111,1111,1110,11101,101011,111111,101,111001, %U A004287 1011,110,1111111,1011111,100111,11011,10011,100111,1010,1101111 %N A004287 Least positive multiple of n written in base 7 using only 0 and 1. %H A004287 Harvey P. Dale, <a href="/A004287/b004287.txt">Table of n, a(n) for n = 1..1000</a> %t A004287 With[{cl=Rest[{FromDigits[#,7],FromDigits[#]}&/@Tuples[{0,1},7]]},Table[ SelectFirst[ cl,Mod[#[[1]],n]==0&],{n,40}]][[;;,2]] (* _Harvey P. Dale_, Jan 31 2024 *) %o A004287 (Python) %o A004287 def A004287(n): %o A004287 if n > 0: %o A004287 for i in range(1,2**n): %o A004287 s = bin(i)[2:] %o A004287 if not int(s,7) % n: %o A004287 return int(s) %o A004287 return 0 # _Chai Wah Wu_, Dec 30 2014 %Y A004287 Cf. A244958 (written in base 10). %K A004287 nonn,base %O A004287 1,2 %A A004287 _David W. Wilson_ %E A004287 Removed initial 0 since (1) it did not match the definition, and (2) there are many similar sequences with the same author which also say "positive". Also changed offset. - _N. J. A. Sloane_, Jan 31 2024 %E A004287 Previous b-file replaced by _Harvey P. Dale_, Jan 31 2024