|
|
A342348
|
|
Smallest number > 3 whose representation in all bases from 2 up to n consists only of '0's, '1's, '2's and '3's.
|
|
0
|
|
|
|
OFFSET
|
2,1
|
|
COMMENTS
|
Conjecture: there are no more terms.
|
|
LINKS
|
|
|
EXAMPLE
|
a(9) = 8281.
8281 in base 2 = 10000001011001
8281 in base 3 = 102100201
8281 in base 4 = 2001121
8281 in base 5 = 231111
8281 in base 6 = 102201
8281 in base 7 = 33100
8281 in base 8 = 20131
8281 in base 9 = 12321
|
|
PROG
|
(Python)
def only0123(n, b):
while n >= b:
n, r = divmod(n, b)
if r > 3: return False
return n <= 3
def a(n):
k = max(4, n)
while not all(only0123(k, b) for b in range(2, n+1)): k += 1
return k
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,more
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|