OFFSET
0,1
LINKS
Rémy Sigrist, Table of n, a(n) for n = 0..10000
FORMULA
A327225(n) < a(n) <= 1 + max(2, n+1).
EXAMPLE
For n = 11:
- the representations of 11 in bases b = 2..9 are:
b 11 in base b
- ------------
2 "1011"
3 "102"
4 "23"
5 "21"
6 "15"
7 "14"
8 "13"
9 "12"
- the representation in base 9 is the least that shows the same digits, up to order, to some former base, namely the base 5,
- hence a(11) = 9.
PROG
(PARI) a(n) = { my (s=[]); for (v=2, oo, my (d=vecsort(digits(n, v))); if (setsearch(s, d), return (v), s=setunion(s, [d]))) }
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Aug 27 2019
STATUS
approved