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 A123699 #23 Nov 24 2024 14:55:16 %S A123699 1,2,3,4,3,3,3,4,4,5,3,4,4,4,3,5,5,4,3,5,3,5,5,4,6,6,4,4,5,4,6,6,4,6, %T A123699 4,4,7,5,4,5,6,5,7,4,4,7,5,5,4,4,5,4,5,4,5,4,4,5,5,6,8,6,6,9,5,5,7,6, %U A123699 5,5,5,7,5,7,4,5,5,4,5,5,6,5,6,5,5,5,7,7,5,6,6,8,7,6,5,5,5,8,4,11,5,5,5,7,5 %N A123699 Smallest b such that all digits are distinct in base b representation of n. %C A123699 a(A123700(n)) = n and a(m) <> n for m < A123700(n). %C A123699 See A126688 for another version of the same sequence. - _R. J. Mathar_, Jun 15 2008 %H A123699 Reinhard Zumkeller, <a href="/A123699/b123699.txt">Table of n, a(n) for n = 1..10000</a> %e A123699 n=10: 1010 [b=2] = 101 [b=3] = 22 [b=4] = 20 [b=5]: a(10)=5; %e A123699 n=11: 1011 [b=2] = 102 [b=3]: a(11)=3; %e A123699 n=12: 1100 [b=2] = 110 [b=3] = 30 [b=4]: a(12)=4; %e A123699 n=13: 1101 [b=2] = 111 [b=3] = 31 [b=4]: a(13)=4; %e A123699 n=14: 1110 [b=2] = 112 [b=3] = 32 [b=4]: a(14)=4; %e A123699 n=15: 1111 [b=2] = 120 [b=3]: a(15)=3. %t A123699 s={};Do[b=1;Until[id= IntegerDigits[n,b];Length[id]==CountDistinct[id],b++];AppendTo[s,b],{n,2,105}];Join[{1},s] (* _James C. McMahon_, Nov 24 2024 *) %o A123699 (PARI) a(n) = if (n==1, 1, my(b = 2, do = 1); while (do, vb = digits(n, b); if (#vb == #Set(vb), do = 0, b++); ); b); \\ _Michel Marcus_, Jun 09 2013; corrected Jun 14 2022 %o A123699 (Python) %o A123699 from sympy.ntheory.digits import digits %o A123699 def distinct(n, b): d = digits(n, b); return len(d) == len(set(d)) %o A123699 def a(n): %o A123699 if n == 1: return 1 %o A123699 b = 2 %o A123699 while not distinct(n, b): b += 1 %o A123699 return b %o A123699 print([a(n) for n in range(1, 106)]) # _Michael S. Branicky_, Jun 15 2022 %Y A123699 Cf. A126688, A123700. %K A123699 nonn,base %O A123699 1,2 %A A123699 _Reinhard Zumkeller_, Oct 08 2006