%I #23 Jan 12 2021 21:37:58
%S 1,2,2,3,4,5,6,7,8,9,11,12,13,14,15,16,17,18,19,20,22,24,26,28,30,33,
%T 36,39,42,45,48,56,57,60,69,72,81,84,93,105,105,144,144,177,216,225,
%U 225,288,441,513,513,729,1224,1800,2304,2304,4761,4761,11664,11664,11664
%N Smallest number that can be represented in n different ways in n different bases utilizing only decimal characters (0 to 9).
%C Is it possible that this sequence is finite?
%C a(62) > 125000. - _Ray Chandler_, Jun 19 2006
%C a(62) < 2^(2^62). In fact a(n) < 2^(2^n). The sequence is infinite. - _Sergio Pimentel_, Jan 06 2021
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/Base.html">Base</a>.
%e a(3)=2 because 2 is the smaller number that can be represented in 3 different ways using decimal characters (11 in unary, 10 in binary and 2 in ternary and higher).
%e a(43)=144 because 144 is the smallest number that can be represented in 43 different ways (using only decimal characters), like 144=10010000 in binary, 144=220 in octal, 144=99 in base 15, 144=20 in base 72, etc...
%t f[n_] := 1 + If[n == 1, 0,Length@Select[Table[IntegerDigits[n, b], {b, 2, n + 1}], Apply[And, Map[ # < 10 &, # ]] &]]; \ a = {};k = 1;Do[While[f[k] < n, k++ ];AppendTo[a, k];, {n, 61}]; a (* _Ray Chandler_, Jun 19 2006 *)
%o (Python)
%o def a(n, startat=1):
%o k = startat
%o while True:
%o base, reps = 2, {(1,)} # stand-in for unary representation
%o while len(reps) < n:
%o digs, kb, all09 = [], k, True
%o while kb >= base:
%o kb, d = divmod(kb, base)
%o digs.append(d)
%o if d > 9: all09 = False; break # short circuit the conversion
%o digs += [kb]
%o if all09 and kb <= 9: reps.add(tuple(digs))
%o if len(digs) == 1: break
%o base += 1
%o if len(reps) >= n: return k
%o k += 1
%o an = 1
%o for n in range(1, 62):
%o an = a(n, startat=an)
%o print(an, end=", ") # _Michael S. Branicky_, Jan 06 2021
%Y Cf. A118716, A095425, A095426, A095427, A095428.
%K base,nonn
%O 1,2
%A _Sergio Pimentel_, Jun 13 2006
%E a(55)-a(61) from _Ray Chandler_, Jun 19 2006
|