OFFSET
2,1
LINKS
Robert Israel, Table of n, a(n) for n = 2..10000
EXAMPLE
a(10) = 16 because 2^16 = 65536 does not have all distinct digits in base 10, while 2^k does have all distinct digits for 1 <= k <= 15.
MAPLE
f:= proc(n) local k, L;
for k from 2 do
L:= convert(2^k, base, n);
if nops(L) <> nops(convert(L, set)) then return k fi
od;
end proc:
map(f, [$2..100]);
PROG
(Python)
from itertools import count
from sympy.ntheory import digits
def a(n): return next(k for k in count(2) if len(set(d:=digits(1<<k, n)[1:]))<len(d))
print([a(n) for n in range(2, 80)]) # Michael S. Branicky, Jul 05 2023
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Robert Israel, Jul 03 2023
STATUS
approved