%I #11 May 23 2022 12:29:25
%S 1,81,91,109,127,360,361,417,504,540,541,631,661,720,781,841,918,981,
%T 991,1008,1009,1039,1080,1081,1088,1089,1090,1091,1093,1099,1105,1111,
%U 1116,1117,1118,1119,1120,1121,1122,1123,1124,1125,1126,1128,1134,1135,1136,1137,1138,1139
%N Decimal numbers such that when they are written in all bases from 2 to 10 those numbers all share a common digit (the digit 0 or 1).
%C As base 2 is included the only possible common digit between all the bases is either a 0 or 1.
%H Michael S. Branicky, <a href="/A335066/b335066.txt">Table of n, a(n) for n = 1..10000</a>
%e 1 is a term as 1 written in all bases is 1.
%e 81 is a term as 81_2 = 1010001, 81_3 = 10000, 81_4 = 1101, 81_5 = 311, 81_6 = 213, 81_7 = 144, 81_8 121, 81_9 = 100, 81_10 = 81, all of which contain the digit 1.
%e 360 is a term as 360_2 = 101101000, 360_3 = 111100, 360_4 = 11220, 360_5 = 2420, 360_6 = 1400, 360_7 = 1023, 360_8 = 550, 360_9 = 550, 360_10 = 360, all of which contain the digit 0.
%o (Python)
%o def hasdigits01(n, b):
%o has0, has1 = False, False
%o while n >= b:
%o n, r = divmod(n, b)
%o if r == 0: has0 = True
%o if r == 1: has1 = True
%o if has0 and has1: return (True, True)
%o return (has0, has1 or n==1)
%o def ok(n):
%o all0, all1 = True, True
%o for b in range(10, 1, -1):
%o has0, has1 = hasdigits01(n, b)
%o all0 &= has0; all1 &= has1
%o if not all0 and not all1: return False
%o return all0 or all1
%o print([k for k in range(1140) if ok(k)]) # _Michael S. Branicky_, May 23 2022
%Y Cf. A335051, A258107, A145100, A317725, A181929, A331565, A153114.
%K nonn,base
%O 1,2
%A _Scott R. Shannon_ and _Zach J. Shannon_, May 22 2020