|
|
A152925
|
|
a(n) = smallest number m such that in 1,2,..,m written in base n, no two of the n digits occurs the same number of times.
|
|
0
|
|
|
1, 5, 13, 47, 105, 536, 1341, 9231, 24697, 212594, 592269, 6100559, 17464969, 209215572, 610839805, 8338210079, 24709115769, 378460880126
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
2,2
|
|
LINKS
|
|
|
EXAMPLE
|
In base 5 in 1,2,..,142_5 = 47, digit 1 occurs 43 times, 2 occurs 20, 3 occurs 19 times, 4 occurs 17 times, and 0 occurs 14.
|
|
PROG
|
(Python)
def different(d):
for i in range(len(d)):
for j in range(i):
if d[i] == d[j]:
return False
return True
def a(base):
d = [0] * base
n = 0
while True:
n += 1
m = n
while m > 0:
d[m % base] += 1
m //= base
if different(d):
break
return n
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,more
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|