cp's OEIS Frontend

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.

A119352 Smallest base b > 1 such that n in base b uses no digit b-1.

This page as a plain text file.
%I A119352 #11 Jul 30 2025 09:46:33
%S A119352 2,3,4,3,3,4,4,5,4,3,3,5,3,3,6,5,4,4,4,6,4,4,4,7,4,4,4,3,3,7,3,3,4,4,
%T A119352 4,5,3,3,4,3,3,4,4,5,6,6,6,9,6,6,5,5,5,5,6,5,5,5,5,7,5,5,5,5,4,4,4,5,
%U A119352 4,4,4,7,4,4,4,5,5,5,5,6,4,3,3,5,3,3,4,5,4,4,3,3,5,3,3,9,4,4,4,6,4,4,4,7,4
%N A119352 Smallest base b > 1 such that n in base b uses no digit b-1.
%H A119352 Reinhard Zumkeller, <a href="/A119352/b119352.txt">Table of n, a(n) for n = 0..10000</a>
%F A119352 7 is 111_2 (has 1), 21_3 (has 2), 13_4 (has 3), but 12_5 (no 4), so a(7) = 5.
%t A119352 a[n_] := Module[{b = 2}, While[MemberQ[IntegerDigits[n, b], b-1], b++]; b]; Array[a, 100, 0] (* _Amiram Eldar_, Jul 29 2025 *)
%o A119352 (Haskell)
%o A119352 a119352 n = f 2 n where
%o A119352    f b x = g x where
%o A119352      g 0 = b
%o A119352      g z = if r == b - 1 then f (b + 1) n else g z'
%o A119352            where (z', r) = divMod z b
%o A119352 -- _Reinhard Zumkeller_, Apr 12 2015
%o A119352 (PARI) a(n) = {my(b = 2, d); while(d = digits(n, b); #d > 0 && vecmax(d) == b-1, b++); b;} \\ _Amiram Eldar_, Jul 29 2025
%Y A119352 Cf. A106370, A119353, A119354.
%K A119352 base,nonn
%O A119352 0,1
%A A119352 _Franklin T. Adams-Watters_, May 15 2006