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 A335051 #29 Feb 10 2021 01:31:43 %S A335051 2,9,19,28,145,384,1128,2601,2601,101256,103824,382010,572101,971400, %T A335051 1773017,1773017,22873201,64041048,64041048,1193875201,2496140640, %U A335051 10729882801,21660922801,120068616277,333679563001,427313653201,427313653201,10436523921264,10868368953601 %N A335051 a(n) is the smallest decimal number > 1 such that when it is written in all bases from base 2 to base n those numbers all contain both 0 and 1. %C A335051 The sequence is infinite since 1 + lcm(2,...,n)^2 is always a candidate for a(n). - _Giovanni Resta_, May 24 2020 %H A335051 Giovanni Resta, <a href="/A335051/b335051.txt">Table of n, a(n) for n = 2..32</a> %e A335051 a(3) = 9 as 9_2 = 1001 and 9_3 = 100, both of which contain a 0 and 1. %e A335051 a(6) = 145 as 145_2 = 10010001, 145_3 = 12101, 145_4 = 2101, 145_5 = 1040, 145_6 = 401, all of which contain a 0 and 1. %e A335051 a(9) = 2601 as 2601_2 = 101000101001, 2601_3 = 10120100, 2601_4 = 220221, 2601_5 = 40401, 2602_6 = 20013, 2601_7 = 10404, 2601_8 = 5051, 2601_9 = 3510, all of which contain a 0 and 1. Note that, as 2601 also contains a 0 and 1, a(10) = 2601. %e A335051 a(16) = 1773017 as 1773017_2 = 110110000110111011001, 1773017_3 = 10100002010022, 1773017_4 = 12300313121, 1773017_5 = 423214032, 1773017_6 = 102000225, 1773017_7 = 21033101, 1773017_8 = 6606731, 1773017_9 = 3302108, 1773017_10 = 1773017, 1773017_11 = 1001104, 1773017_12 = 716075, 1773017_13 = 4A102C, 1773017_14 = 342201, 1773017_15 = 250512, 1773017_16 = 1B0DD9, all of which contain a 0 and 1. %t A335051 a[n_] := Block[{k=2}, While[ AnyTrue[ Range[n, 2, -1], ! SubsetQ[ IntegerDigits[k, #], {0, 1}] &], k++]; k]; a /@ Range[2, 13] (* _Giovanni Resta_, May 24 2020 *) %o A335051 (Python) %o A335051 from numba import njit %o A335051 @njit %o A335051 def hasdigits01(n, b): %o A335051 has0, has1 = False, False %o A335051 while n >= b: %o A335051 n, r = divmod(n, b) %o A335051 if r == 0: has0 = True %o A335051 if r == 1: has1 = True %o A335051 if has0 and has1: return True %o A335051 return has0 and (has1 or n==1) %o A335051 @njit %o A335051 def a(n, start=2): %o A335051 k = start %o A335051 while True: %o A335051 for b in range(n, 1, -1): %o A335051 if not hasdigits01(k, b): break %o A335051 else: return k %o A335051 k += 1 %o A335051 anm1 = 2 %o A335051 for n in range(2, 21): %o A335051 an = a(n, start=anm1) %o A335051 print(an, end=", ") %o A335051 anm1 = an # _Michael S. Branicky_, Feb 09 2021 %Y A335051 Cf. A335066, A258107, A145100, A317725, A181929, A331565, A153114. %K A335051 nonn,base %O A335051 2,1 %A A335051 _Zach J. Shannon_ and _Scott R. Shannon_, May 21 2020 %E A335051 a(29)-a(30) from _Giovanni Resta_, May 24 2020