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.

Showing 1-3 of 3 results.

A106370 Smallest b > 1 such that n contains no zeros in its base b representation.

Original entry on oeis.org

2, 3, 2, 3, 3, 4, 2, 3, 4, 4, 4, 5, 3, 3, 2, 3, 3, 5, 5, 6, 4, 3, 3, 5, 3, 3, 4, 6, 4, 4, 2, 5, 5, 5, 6, 5, 4, 4, 4, 3, 3, 4, 3, 3, 4, 4, 4, 5, 3, 3, 6, 3, 3, 4, 4, 5, 4, 4, 4, 7, 4, 4, 2, 5, 6, 5, 3, 3, 5, 3, 3, 5, 5, 5, 7, 3, 3, 7, 3, 3, 5, 5, 5, 5, 4, 4, 4, 5, 4, 4, 4, 5, 4, 4, 4, 5, 5, 5, 5, 6, 4, 4, 4, 6, 4
Offset: 1

Views

Author

Reinhard Zumkeller, May 01 2005

Keywords

Examples

			n = 20: 20[binary] = '101001', 20[ternary] = '202', 20[base-4] = '110', 20[base-5] = '40', all containing at least one zero, but: 20[base-6] = '32', containing no zero therefore a(20) = 6.
		

Crossrefs

Programs

  • Haskell
    a106370 n = f 2 n where
       f b x = g x where
         g 0 = b
         g z = if r == 0 then f (b + 1) n else g z'
               where (z', r) = divMod z b
    -- Reinhard Zumkeller, Apr 12 2015
  • Mathematica
    a[n_] := Module[{b = 2}, While[MemberQ[IntegerDigits[n, b], 0], b++]; b]; Array[a, 100] (* Amiram Eldar, Jul 29 2025 *)

Formula

a(n*a(n)+k) <= a(n) for 1 <= k < a(n).
a(A106372(n)) = n and a(m) <> n for m < A106372(n).
a(A000225(n)) = 2; a(A032924(n)) = 3 for n <> 5.

Extensions

Typo in comment fixed by Reinhard Zumkeller, Aug 06 2010

A119354 Smallest number which does not use digit n-1 written in base n, but does use digit b-1 written in base b for any 1

Original entry on oeis.org

0, 1, 2, 7, 14, 23, 139, 47, 485, 319, 989, 239, 5927, 23319, 27719, 13679, 57119, 159119, 746927, 500399, 1627919, 2585519, 3694397, 7305479, 17067599, 82265039, 384812999, 41126399, 61483967, 586370399, 589188599, 2196179999, 1770310079
Offset: 2

Views

Author

Keywords

Crossrefs

Programs

  • Haskell
    import Data.List (elemIndex); import Data.Maybe (fromJust)
    a119354 = fromJust . (`elemIndex` a119352_list)
    -- Reinhard Zumkeller, Apr 12 2015

Formula

A119352(a(n)) = n and A119352(m) != n for m < a(n). - Reinhard Zumkeller, Apr 12 2015

Extensions

More terms from R. J. Mathar, Sep 07 2007
a(21)-a(27) by Reinhard Zumkeller, Apr 12 2015
a(28)-a(34) from Amiram Eldar, Jul 29 2025

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.

Original entry on oeis.org

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, 9, 25, 10, 11, 18, 19, 20, 24, 12, 13, 23, 14, 15, 25, 26, 31, 32, 33, 34, 42, 35, 36, 32, 33, 34, 35, 40, 36, 37, 38, 39, 45, 40, 41, 42, 43, 27, 28, 29, 46, 30, 31, 32, 55, 33, 34, 35
Offset: 0

Views

Author

Keywords

Comments

The b that produces the smallest value is always the smallest b such that n in base b does not use b-1.

Examples

			10 = 101_3, 101_2 = 5, so a(10) = 5.
11 = 102_3, which has a 2; 11 = 23_4, which has a 3; 11 = 21_5, 21_4 = 9, so a(11) = 9.
		

Crossrefs

Cf. A119352.

Programs

  • Mathematica
    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 *)
  • 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
Showing 1-3 of 3 results.