OFFSET
1,2
COMMENTS
Is it possible that this sequence is finite?
a(62) > 125000. - Ray Chandler, Jun 19 2006
a(62) < 2^(2^62). In fact a(n) < 2^(2^n). The sequence is infinite. - Sergio Pimentel, Jan 06 2021
LINKS
Eric Weisstein's World of Mathematics, Base.
EXAMPLE
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).
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...
MATHEMATICA
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 *)
PROG
(Python)
def a(n, startat=1):
k = startat
while True:
base, reps = 2, {(1, )} # stand-in for unary representation
while len(reps) < n:
digs, kb, all09 = [], k, True
while kb >= base:
kb, d = divmod(kb, base)
digs.append(d)
if d > 9: all09 = False; break # short circuit the conversion
digs += [kb]
if all09 and kb <= 9: reps.add(tuple(digs))
if len(digs) == 1: break
base += 1
if len(reps) >= n: return k
k += 1
an = 1
for n in range(1, 62):
an = a(n, startat=an)
print(an, end=", ") # Michael S. Branicky, Jan 06 2021
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Sergio Pimentel, Jun 13 2006
EXTENSIONS
a(55)-a(61) from Ray Chandler, Jun 19 2006
STATUS
approved