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.

A106371 Representation of n in base b, where b is minimal such that n contains no zeros: b = A106370(n).

Original entry on oeis.org

1, 2, 11, 11, 12, 12, 111, 22, 21, 22, 23, 22, 111, 112, 1111, 121, 122, 33, 34, 32, 111, 211, 212, 44, 221, 222, 123, 44, 131, 132, 11111, 112, 113, 114, 55, 121, 211, 212, 213, 1111, 1112, 222, 1121, 1122, 231, 232, 233, 143, 1211, 1212, 123, 1221, 1222, 312
Offset: 1

Views

Author

Reinhard Zumkeller, May 01 2005

Keywords

Comments

In decimal representation feasible only for bases <= 10; A106371(11) = 360 = 2*11^2 + 10*11^1 + 8*11^0 is the first number which cannot be written zerofree with digits 1..9 in base 11. Therefore this sequence is finite with exactly 359 terms. - Reinhard Zumkeller, Apr 12 2015

Crossrefs

Programs

  • Haskell
    a106371 n = a106371_list !! (n-1)
    a106371_list = map fromJust $ takeWhile (/= Nothing) $ map f [1..] where
       f n = g 2 n where
         g b x = h x 0 where
           h 0 y = if b <= 10 then Just (a004086 y) else Nothing
           h z y = if r == 0 then g (b + 1) n else h z' (10 * y + r)
                   where (z', r) = divMod z b
    -- Reinhard Zumkeller, Apr 12 2015

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

Original entry on oeis.org

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, 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, 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
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Haskell
    a119352 n = f 2 n where
       f b x = g x where
         g 0 = b
         g z = if r == b - 1 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], b-1], b++]; b]; Array[a, 100, 0] (* Amiram Eldar, Jul 29 2025 *)
  • 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

Formula

7 is 111_2 (has 1), 21_3 (has 2), 13_4 (has 3), but 12_5 (no 4), so a(7) = 5.

A106372 Smallest number m containing no zeros in base n representation but at least one zero in all base b representations with 1

Original entry on oeis.org

1, 2, 6, 12, 20, 60, 147, 384, 896, 360, 1540, 2760, 2304, 11016, 13860, 6720, 123060, 255024, 658370, 1422720, 1425606, 1179360, 2920500, 12252240, 9989280, 24227280, 242573760, 68424048, 990208128, 410810400, 602751600
Offset: 2

Views

Author

Reinhard Zumkeller, May 01 2005

Keywords

Comments

A106370(a(n)) = n and A106370(m) <> n for m < a(n).
a(46) = 854710136280. a(45) and all further terms are at least 10^13.

Examples

			a(10)=896, A106370(896)=10: 896[base-9]='1205',
896[octal]='1600', 896[base-7]='2420', 896[base-6]='4052',
896[base-5]='12041', 896[base-4]='32000', 896[ternary]='1020012',
896[binary]='1110000000'.
		

Crossrefs

Programs

  • Haskell
    import Data.List (elemIndex); import Data.Maybe (fromJust)
    a106372 = (+ 1) . fromJust . (`elemIndex` a106370_list)
    -- Reinhard Zumkeller, Apr 12 2015

Extensions

Generated a(33)-a(44) and a(46), with linked C++ program
Showing 1-3 of 3 results.