This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A119353 #13 Jul 30 2025 09:46:38 %S A119353 0,1,2,2,3,4,5,6,6,4,5,9,6,7,12,12,9,10,11,16,12,13,14,20,15,16,17,8, %T A119353 9,25,10,11,18,19,20,24,12,13,23,14,15,25,26,31,32,33,34,42,35,36,32, %U A119353 33,34,35,40,36,37,38,39,45,40,41,42,43,27,28,29,46,30,31,32,55,33,34,35 %N A119353 Smallest value obtained by writing n in base b > 1 such that n in base b uses no digit b-1 and then interpreting this as a base b-1 number. %C A119353 The b that produces the smallest value is always the smallest b such that n in base b does not use b-1. %H A119353 Rémy Sigrist, <a href="/A119353/b119353.txt">Table of n, a(n) for n = 0..10000</a> %e A119353 10 = 101_3, 101_2 = 5, so a(10) = 5. %e A119353 11 = 102_3, which has a 2; 11 = 23_4, which has a 3; 11 = 21_5, 21_4 = 9, so a(11) = 9. %t A119353 a[n_] := Module[{b = 2}, While[MemberQ[IntegerDigits[n, b], b-1], b++]; FromDigits[IntegerDigits[n, b], b-1]]; Array[a, 100, 0] (* _Amiram Eldar_, Jul 29 2025 *) %o A119353 (PARI) a(n) = for (b=3, oo, my (d=digits(n, b)); if (#d==0 || vecmax(d) < b-1, return (fromdigits(d, b-1)))) \\ _Rémy Sigrist_, May 07 2018 %Y A119353 Cf. A119352. %K A119353 base,nonn %O A119353 0,3 %A A119353 _Franklin T. Adams-Watters_, May 15 2006