%I #18 Aug 31 2019 04:09:46
%S 2,2,3,4,5,6,7,3,9,4,11,5,13,4,15,7,5,5,19,6,21,5,3,7,25,6,6,13,4,9,7,
%T 7,33,8,8,11,7,7,7,19,13,13,10,10,7,7,5,9,49,9,8,5,4,10,13,13,9,9,9,
%U 19,61,10,10,10,9,9,5,9,6,13,11,11,73,10,9,12,9
%N For any n >= 0, let u and v be such that 2 <= u < v and the digits of n in bases u and v are the same up to a permutation and v is minimized; a(n) = u.
%C For any n >= 0, the sequence is well defined as the representation of n in any base b >= max(2, n+1) corresponds to a single digit n.
%C (n, u = A327225(n), v = A327226(n)) = (n, n+1, n+2) iff n = 1 or n is in A059809. - _Bernard Schott_, Aug 31 2019
%H Rémy Sigrist, <a href="/A327225/b327225.txt">Table of n, a(n) for n = 0..10000</a>
%F a(n) <= max(2, n+1).
%e For n = 11:
%e - the representations of 11 in bases b = 2..9 are:
%e b 11 in base b
%e - ------------
%e 2 "1011"
%e 3 "102"
%e 4 "23"
%e 5 "21"
%e 6 "15"
%e 7 "14"
%e 8 "13"
%e 9 "12"
%e - the representation in base 9 is the least that shows the same digits, up to order, to some former base, namely the base 5,
%e - hence a(11) = 5.
%o (PARI) a(n) = { my (s=[]); for (v=2, oo, my (d=vecsort(digits(n,v))); if (setsearch(s,d), forstep (u=v-1, 2, -1, if (vecsort(digits(n,u))==d, return (u))), s=setunion(s,[d]))) }
%Y See A327226 for the corresponding v's.
%Y Cf. A004053, A059809.
%K nonn,base
%O 0,1
%A _Rémy Sigrist_, Aug 27 2019
|