login
A364049
a(n) is the least k such that the base-n digits of 2^k are not all distinct.
3
2, 2, 4, 5, 6, 3, 6, 11, 16, 14, 11, 12, 8, 4, 8, 15, 16, 12, 16, 18, 9, 17, 15, 14, 24, 13, 16, 15, 10, 5, 10, 19, 24, 14, 21, 15, 18, 15, 19, 17, 17, 28, 18, 12, 24, 23, 31, 24, 31, 20, 26, 44, 35, 33, 25, 18, 36, 14, 14, 18, 12, 6, 12, 23, 45, 37, 38, 24, 20, 35, 36, 26, 51, 31, 33, 47, 34, 34
OFFSET
2,1
LINKS
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
KEYWORD
nonn,base
AUTHOR
Robert Israel, Jul 03 2023
STATUS
approved