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 A370571 #28 Feb 22 2024 20:19:15 %S A370571 10,10,1011,100,10,1110,1001,1000,1011111111,10,110,11100,1001,10010, %T A370571 1110,10000,11101,1111111110,11001,100,10101,110,110101,111000,100, %U A370571 10010,1101111111,100100,1101101,1110,111011,100000,1101111,111010,10010,11111111100,1110,110010,10101,1000 %N A370571 Smallest multiple of n that when written in base 10 uses only 0's and 1's and at least one of each. %C A370571 For all n, a(n) exists (see proof in References). %D A370571 Peter Winkler, Mathematical Puzzles (revised edition), CRC Press, 2024, p. liii. %H A370571 Michael S. Branicky, <a href="/A370571/b370571.txt">Table of n, a(n) for n = 1..10000</a> %F A370571 a(10^e-1) <= 1^e 0 1^(8*e), where ^ denotes repeated concatenation of digits on the right-hand side. - _Michael S. Branicky_, Feb 22 2024 %t A370571 a[n_]:=Min[Select[FromDigits/@Tuples[{0,1},n+1], %t A370571 Divisible[#,n]&&Union[IntegerDigits[#]]=={0,1}&]]; a/@Range[23] %o A370571 (Python) %o A370571 from itertools import count %o A370571 def a(n): return next(d for k in count(1) if ("0" in (b:=bin(k)[2:])) and (d:=int(b))%n==0) %o A370571 print([a(n) for n in range(1, 24)]) # _Michael S. Branicky_, Feb 22 2024 %Y A370571 Cf. A004290, A244859, A007088. %K A370571 nonn,base %O A370571 1,1 %A A370571 _Ivan N. Ianakiev_, Feb 22 2024 %E A370571 More terms from _Michael S. Branicky_, Feb 22 2024