[Question]
  [
Given a positive integer `n`, output the smallest base `b >= 2` where the representation of `n` in base `b` with no leading zeroes does not contain a `0`. You may assume that `b <= 256` for all inputs.
## Test Cases
```
1 -> 2 (1)
2 -> 3 (2)
3 -> 2 (11)
4 -> 3 (11)
5 -> 3 (12)
6 -> 4 (12)
7 -> 2 (111)
10 -> 4 (22)
17 -> 3 (122)
20 -> 6 (32)
50 -> 3 (1212)
100 -> 6 (244)
777 -> 6 (3333)
999 -> 4 (33213)
1000 -> 6 (4344)
1179360 -> 23 ([12, 9, 21, 4, 4])
232792560 -> 23 ([15, 12, 2, 20, 3, 13, 1])
2329089562800 -> 31 ([20, 3, 18, 2, 24, 9, 20, 22, 2])
69720375229712477164533808935312303556800 -> 101 ([37, 17, 10, 60, 39, 32, 21, 87, 80, 71, 82, 14, 68, 99, 95, 4, 53, 44, 10, 72, 5])
8337245403447921335829504375888192675135162254454825924977726845769444687965016467695833282339504042669808000 -> 256 ([128, 153, 236, 224, 97, 21, 177, 119, 159, 45, 133, 161, 113, 172, 138, 130, 229, 183, 58, 35, 99, 184, 186, 197, 207, 20, 183, 191, 181, 250, 130, 153, 230, 61, 136, 142, 35, 54, 199, 213, 170, 214, 139, 202, 140, 3])
```
  
[Answer]
# [Pyth](https://github.com/isaacg1/pyth), 6 bytes
```
f*FjQT
```
**[Verify all the test cases.](https://pyth.herokuapp.com/?code=f%2aFjQT&test_suite=1&test_suite_input=1%0A2%0A3%0A4%0A5%0A6%0A7%0A10%0A17%0A20%0A50%0A100%0A777%0A999%0A1000&debug=0)**
## How it works
```
f*FjQT  ~ Full program.
f       ~ First positive integer where the condition is truthy.
   jQT  ~ The input converted to base of the current element.
 *F     ~ Product. If the list contains 0, then it's 0, else it is strictly positive.
          0 -> Falsy; > 0 -> Truthy.
        ~ Output the result implicitly.
```
Although Pyth's `f` operates on `1, 2, 3, 4, ...` (starting at 1), Pyth treats numbers in base 1 (unary) as a bunch of zeros, so base 1 is ignored.
[Answer]
# C, ~~52~~ 50 bytes
```
i,k;f(n){for(i=2,k=n;k;)k=k%i++?k/--i:n;return i;}
```
[Try it online!](https://tio.run/##fc1BCsIwEAXQfU8RCoWEJthGa4gheBE3Eo0MoaOEuio9eyy61HGW//H/BHULoRSQyUWOYo73zMFrmTy65ETyqYG2PaaNUnBAl6/TMyMDtxTAiY1nQC6quWLrPfIaRV43lxPWkkXeC@F@iyZlS8qOlIGUPSmGlL6jiW5pujX8GexoM4b@Zq39tlXYZ/M9upQX)
# C (gcc), ~~47~~ 45 bytes
```
i,k;f(n){for(i=2,k=n;k;)k=k%i++?k/--i:n;n=i;}
```
[Try it online!](https://tio.run/##fc1BCsIwEAXQfU8RCoWEJthGa4gheBE3EokMg6MUd6Vnj0GXOs7yP/6fZK4plQIaQ5aklnyfJUSrMVLAoDBiB31/xI0xcKBAEcJagJ7idgaSqlkaUe8x1yjLtrucqNUiy1Gp8FssK1tWdqxMrOxZcayMA098y/Kt6c/gwJtz/Dfv/bdVEZ/N9@haXg)
---
*Two bytes saved thanks to @Nevay's suggestion on @Kevin Cruijssen's answer!*
[Answer]
# [Haskell](https://www.haskell.org/), ~~56~~ ~~52~~ 48 bytes
```
b#n=n<1||mod n b>0&&b#div n b
f n=until(#n)(+1)2
```
[Try it online!](https://tio.run/##y0gszk7Nyfn/P0k5zzbPxrCmJjc/RSFPIcnOQE0tSTklswzE4UpTyLMtzSvJzNFQztPU0DbUNPqfm5iZZ1tQlJlXopKmYGlp@R8A "Haskell – Try It Online")
Pretty basic but can't think of any good ways to shorten it
EDIT: Thanks to Laikoni for saving me 4 bytes! Don't know why I never thought of `!!0`. I probably should've tried removing those parentheses but I have vague memories of some weird error when you try to use `||` and `&&` together. Maybe I'm confusing it with the equality operators.
EDIT 2: Thanks @Lynn for shaving another 4 bytes! Don't know how I never knew about `until` before now.
[Answer]
# [Wolfram Language (Mathematica)](https://www.wolfram.com/wolframscript/), 33 bytes
```
2//.i_/;DigitCount[#,i,0]>0:>i+1&
```
[Try it online!](https://tio.run/##y00syUjNTSzJTE78n2ar8d9IX18vM17f2iUzPbPEOb80ryRaWSdTxyDWzsDKLlPbUO2/pjVXQFFmXolDWrShgYFB7H8A "Wolfram Language (Mathematica) – Try It Online")
[Answer]
# [Husk](https://github.com/barbuz/Husk), 7 bytes
```
→V▼MBtN
```
[Try it online!](https://tio.run/##yygtzv5/aFtu/qOmxqJD2/4/apsU9mjaHl@nEr////8bchlxGXOZcJlymXGZcxkacBmacxkZcJkCGQYGXObm5lyWlpYgtgEA "Husk – Try It Online")
### Explanation
```
→V▼MBtN
     tN    list of natural numbers starting from 2
   MB      convert the (implicit) input to each of those bases
 V▼        find the (1-based) index of the first result where the minimum digit is truthy
→          add 1 to this index
```
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 7 bytes
```
2b@Ạ¥1#
```
[Try it online!](https://tio.run/##y0rNyan8/98oyeHhrgWHlhoq////39DAwAAA "Jelly – Try It Online")
[Answer]
# [Python 2](https://docs.python.org/2/), 57 bytes
```
n=x=input()
b=2
while x:z=x%b<1;b+=z;x=[x/b,n][z]
print b
```
[Try it online!](https://tio.run/##K6gsycjPM/r/P8@2wjYzr6C0REOTK8nWiKs8IzMnVaHCqsq2QjXJxtA6Sdu2yrrCNrpCP0knLza6KparoCgzr0Qh6f9/IwA "Python 2 – Try It Online")
This is one byte shorter than a recursive function:
```
f=lambda n,b=1,x=1:b*(x<1)or f(n,b+(x%b<1),[x/b,n][x%b<1])
```
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), 6 bytes
-4 bytes thanks to Adnan
```
1µNвPĀ
```
[Try it online!](https://tio.run/##MzBNTDJM/f/f8NBWvwubAo40/P9vCgA "05AB1E – Try It Online")
[Answer]
# [Husk](https://github.com/barbuz/Husk), 9 bytes
```
←foΠ`B⁰tN
```
[Try it online!](https://tio.run/##yygtzv5/aFtu/qOmxqJD2/4/apuQln9uQYLTo8YNJX7///835DLiMuYy4TLlMuMy5zI04DI05zIy4DIFMgwMuMzNzbksLS1BbAMA "Husk – Try It Online")
## Explanation
```
            -- input N
        tN  -- tail of [1..] == [2..]
←f(    )    -- filter with the following:
    `B⁰     --   convert N to that base
   Π        --   product (0 if it contains 0)
←           -- only keep first element
```
[Answer]
# Java 8, ~~61~~ ~~56~~ 54 bytes
```
n->{int b=2,t=n;for(;t>0;)t=t%b++<1?n:t/--b;return b;}
```
[Try it here.](https://tio.run/##hY7BbsIwEETvfMVeKjmiSZO0EKVu6BeUC0fUg20MMoRN5GyQKpRvDw5wrVZar@R9o5k5qouKm9bicXcaTa26Dn6Uw@sMwCFZv1fGwnr63g9gxLQxkuEyhBemI0XOwBoQKhgxXl0nia7yV6pQ7hsvJK1SGVFFL3o@/8q@8ZPe4lhLb6n3CFoOo3x4tb2ug9fT8tK4HZxDHbEh7/Cw/QUVPbps/jqy56TpKWkDohoFJkZk0b3Zvzxn@DvDPxi@YPiS4QXDs5QTcA4557BgI1JOURRci7Is@ZRnzDAbxhs)
**Explanation:**
```
n->{            // Method with integer as both parameter and return-type
  int b=2,      //  Base-integer, starting at 2
      t=n;      //  Temp-integer, copy of the input
  for(;t>0;)    //  Loop as long as `t` is not 0
    t=t%b++<1?  //   If `t` is divisible by the base `b`
                //   (and increase the base `b` by 1 afterwards with `b++`)
       n        //    Set `t` to the input `n`
      :         //   Else:
       t/--b;   //    Divide `t` by the `b-1`
                //    (by decreasing the base `b` by 1 first with `--b`)
                //  End of loop (implicit / single-line body)
  return b;     //  Return the resulting base
}               // End of method
```
~~I have the feeling this can be golfed by using an arithmetic approach.~~ It indeed can, with a port of [@Steadybox' C answer](https://codegolf.stackexchange.com/a/146315/52210), and then golfed by 2 bytes thanks to *@Nevay*.
Old (**61 bytes**) answer:
```
n->{int b=1;for(;n.toString(n,++b).contains("0"););return b;}
```
[Try it here.](https://tio.run/##hY4xb8IwFIR3fsUTky2KldBCFFl071AWxqqDYwwyDc@R/YJUofz21BDW6kn24PvOd3c2V7MMncPz4We0rUkJPo3H2wzAI7l4NNbB7v58CGDFR5ZPLgJKndUh33wSGfIWdoCwhRGX77e7udmW@hii0Kgo7Cl6PAl8WSwaqWxAyj1JzIu51FJHR31EaPQw6imy65s2Rz6Tr8Ef4JJ/iCnn6xuMnGbtfxO5iwo9qS4jalGgsqKUj4H/8hXDXxn@xvA1wzcMrxheFpyBS1hxCWu2ouAcVcWtqOuab3nWDLNh/AM)
**Explanation:**
```
n->{         // Method with Integer as both parameter and return-type
  int b=1;   //  Base-integer, starting at 1
  for(;n.toString(n,++b).contains("0"););
             //  Loop as long as the input in base-`b` does contain a 0,
             //  after we've first increased `b` by 1 before every iteration with `++b`
  return b;  //  Return the resulting base
}            // End of method
```
[Answer]
# [APL (Dyalog)](https://www.dyalog.com/), ~~20~~ 19 [bytes](https://codegolf.meta.stackexchange.com/questions/9428/when-can-apl-characters-be-counted-as-1-byte-each/9429#9429)
```
1+⍣{~0∊⍺⊥⍣¯1⊢n}≢n←⎕
```
[Try it online!](https://tio.run/##SyzI0U2pTMzJT///qKM97b@h9qPexdV1Bo86uh717nrUtRTIPbTe8FHXorzaR52L8h61TXjUNxWk9n8alxkA)
As usual, thanks to @Adám for helping out in chat and getting the code to work in TIO. Also, saving 1 byte.
This is tradfn (**trad**itional **f**unctio**n**) body. To use it, you need to assign it a name (which is in TIO's header field), enclose it in `∇`s (one before the name and one in TIO's footer field), and then call it using its name. Since it uses a quad (`⎕`) to take the user's input, it's called as `f \n input` instead of the usual `f input`
### How?
```
1+⍣{~0∊⍺⊥⍣¯1⊢n}≢n←⎕  ⍝ Main function.
                  n←⎕ ⍝ Assigns the input to the variable n
1+⍣{           }≢     ⍝ Starting with 1, add 1 until the expression in braces is truthy
    ~0∊               ⍝ returns falsy if 0 "is in"
        ⊥             ⍝ convert
            ⊢n        ⍝ the input
         ⍣¯1          ⍝ to base
       ⍺              ⍝ left argument (which starts at 1 and increments by 1)
```
The function then returns the resulting base.
[Answer]
# [Japt](https://github.com/ETHproductions/japt), 8 bytes
```
@ìX e}a2
```
[Try it online!](https://ethproductions.github.io/japt/?v=1.4.5&code=QOxYIGV9YTI=&input=OTk5)
## Explanation
```
@    }a2
```
Return the first number (`X`) to pass the function, starting at `2`
```
ìX
```
Convert the input number to an array of base-`X` digits.
```
e
```
Check if all digits are truthy.
[Answer]
# JavaScript (ES6), ~~43~~ ~~41~~ 37 bytes
```
n=>(g=x=>x?g(x%b++?x/--b|0:n):b)(b=1)
```
### Test cases
```
let f =
n=>(g=x=>x?g(x%b++?x/--b|0:n):b)(b=1)
console.log(f(1   )) // 2 (1)
console.log(f(2   )) // 3 (2)
console.log(f(3   )) // 2 (11)
console.log(f(4   )) // 3 (11)
console.log(f(5   )) // 3 (12)
console.log(f(6   )) // 4 (12)
console.log(f(7   )) // 2 (111)
console.log(f(10  )) // 4 (22)
console.log(f(17  )) // 3 (122)
console.log(f(20  )) // 6 (32)
console.log(f(50  )) // 3 (1212)
console.log(f(100 )) // 6 (244)
console.log(f(777 )) // 6 (3333)
console.log(f(999 )) // 4 (33213)
console.log(f(1000)) // 6 (4344)
```
[Answer]
# [Brachylog](https://github.com/JCumin/Brachylog), 11 bytes
```
;.≜ḃ₎¬∋0∧1¬
```
[Try it online!](https://tio.run/##ASoA1f9icmFjaHlsb2cy//87LuKJnOG4g@KCjsKs4oiLMOKIpzHCrP//Nzc3/1o "Brachylog – Try It Online")
### Explanation
```
;.≜ḃ₎           The Input represented in base Output…
     ¬∋0        …contains no 0
        ∧1¬     And Output ≠ 1
```
[Answer]
# [Python 2](https://docs.python.org/2/), 57 bytes
```
n=m=input()
b=2
while m:c=m%b<1;b+=c;m=(m/b,n)[c]
print b
```
[Try it online!](https://tio.run/##K6gsycjPM/r/P8821zYzr6C0REOTK8nWiKs8IzMnVSHXKtk2VzXJxtA6Sds22TrXViNXP0knTzM6OZaroCgzr0Qh6f9/QwMDAwA "Python 2 – Try It Online")
-1 thanks to [Felipe Nardi Batista](https://codegolf.stackexchange.com/users/66418/felipe-nardi-batista).  
-2 thanks to [Lynn](https://codegolf.stackexchange.com/users/3852/lynn) (and now this is a dupe of her solution :D)
[Answer]
# [Proton](https://github.com/alexander-liao/proton), 40 bytes
```
x=>filter(y=>all(digits(y,x)),2..x+3)[0]
```
[Try it online!](https://tio.run/##KyjKL8nP@59m@7/C1i4tM6cktUij0tYuMSdHIyUzPbOkWKNSp0JTU8dIT69C21gz2iD2f0FRZl6JRpqGoabmfwA "Proton – Try It Online")
[Answer]
# [R](https://www.r-project.org/), ~~79~~ ~~71~~ ~~66~~ ~~63~~ 65 bytes
```
function(n){while(!{T=T+1;all(n%/%T^(0:floor(log(n,T)))%%T)})T
T}
```
[Try it online!](https://tio.run/##VY7LasMwEEX3@grVYDJDByrZjYVd/AtdadcXjiolAiGXWKWFkG93pUAIXVw4zGUO97i6cXXf0SQ/R4h4@jn4YOHupEd9L5@mECDWD7V@BzG4MM9HCPMeImlErGuNZ9RMn9dkl/RhpsUufOQGJDXU0iNtqSNFUpBU1AjaZhCClFLU933hfJCqbzuBzP5@WZPsJ@cXRRGUFE2T02ZVSZe5o6ZFxlxe47mPXA7Bxn06wG0GIjNTgs3zsKHb9cW/UcX5LvNQkYN/DRLP3XVG7q94@XqNFa5/ "R – Try It Online")
This answer is based on Giuseppe's re-arrangement in one single loop.
Saved 8 bytes thanks to JDL, and 6 bytes thanks to Giuseppe.
[Answer]
# [MATL](https://github.com/lmendo/MATL), ~~13~~ 12 bytes
```
`G@Q_YAA~}@Q
```
[Try it online!](https://tio.run/##y00syfn/P8HdITA@0tGxrtYh8P9/c3NzAA "MATL – Try It Online")
-1 byte thanks to Luis Mendo. This program does not handle testcases bigger than 2^53 (`flintmax`, the maximum consecutive integer representable by a floating point type), as the default datatype is `double` in MATL. However, it should be able to find any arbitrary zeroless base below that number.
```
`            % Do while
 G           %  Push input
  @ _        %  Outputs the iteration number, negate.
     YA      %  Convert input to base given by the iteration number, the negative number is to instruct MATL we want an arbitrary high base with a integer vector rather than the default character vector we know from hexadecimal
       A~    %  If they're not all ones, repeat
         }   % But if they are equal, we finally
          @  %  Push the last base
   Q       Q %  As base 1 makes no sense, to prevent MATL from errors we always increase the iteration number by one.
```
[Answer]
# [><>](https://esolangs.org/wiki/Fish), ~~56~~ ~~52~~ ~~51~~ 49 bytes
```
:2&v
1(?\:&:&:@%@,:1%-:
 v~<
l<*v?=2
&v?/:&+1
n>&
```
[Try it online!](https://tio.run/##S8sszvj/38pIrYzLUMM@xkoNCB1UHXSsDFV1rbgUyupsuHJstMrsbY241Mrs9a3UtA258uzU/v//r1tmZGxkaWBhaWpmZGFgAAA "><> – Try It Online")
The interpreter bugs out on the last 2 testcases.  
It only reads the first 16 digits of the input correct and then replaces the rest with other digits.
[Answer]
# PHP, 59+1 bytes
**using builtins**, max base 36:
```
for($b=1;strpos(_.base_convert($argn,10,++$b),48););echo$b;
```
**no builtins, ~~63~~60+1 bytes**, any base:
```
for($n=$b=1;$n&&++$b;)for($n=$argn;$n%$b;$n=$n/$b|0);echo$b;
```
Run as pipe with `-nR` or [try them online](http://sandbox.onlinephpfunctions.com/code/a25caa7efb9ff36eedf301f73f485c4901ce6edd).
[Answer]
# [Actually](https://github.com/Mego/Seriously), ~~12~~ 11 bytes
```
╗1⌠╜¡m'0<⌡╓
```
[Try it online!](https://tio.run/##ASQA2/9hY3R1YWxsef//4pWXMeKMoOKVnMKhbScwPOKMoeKVk///NTA "Actually – Try It Online")
Uses [this consensus](https://chat.stackexchange.com/transcript/message/40769640#40769640). Thanks to [Mego](https://codegolf.stackexchange.com/users/45941/mego) for byte-saving help in [chat](https://chat.stackexchange.com/rooms/240/the-nineteenth-byte). 
[Answer]
# J, 26 bytes
```
]>:@]^:(0 e.]#.inv[)^:_ 2:
```
Would love to know if this can be improved.
The main verb is a the dyadic phrase:
```
>:@]^:(0 e.]#.inv[)^:_
```
which is given the input on the left and the constant 2 on the right. That main verb phrase then uses J's Do..While construct, incrementing the right y argument as long as 0 is an element of `e.` the original argument in base y.
[Try it online!](https://tio.run/##y/qfVqxga6VgoADE/2PtrBxi46w0DBRS9WKV9TLzyqI146ziFYys/mtyKekpqKfZWqkr6CjUWimkFXNxcaUmZ@QrGCnYKqQpGCJzjCEcEzDHDFnGHMIxhuiB8szAPCMDZJ6hgYHBfwA "J – Try It Online")
[Answer]
# [Lua](https://www.lua.org), ~~77~~ 76 bytes
```
b=2n=...N=n
while~~N>0 do
if N%b<1then
b=b+1N=n
else
N=N//b
end
end
print(b)
```
[Try it online!](https://tio.run/##yylN/P8/ydYoz1ZPT8/PNo@rPCMzJ7Wuzs/OQCElnyszTcFPNcnGsCQjNY8ryTZJ2xCkJjWnOJXLz9ZPXz@JKzUvBYwLijLzSjSSNP///29oYGAAAA "Lua – Try It Online")
[Answer]
# [Milky Way](https://github.com/zachgates/Milky-Way), 38 bytes
```
^^'%{255£2+>:>R&{~^?{_>:<;m_+¡}}^^^}
```
usage: `./mw base.mwg -i 3` 
---
## Explanation
```
code                                 explanation                    stack layout
^^                                   clear the preinitialized stack []
  '                                  push the input                 [input]
   %{                              } for loop
     255£                             push next value from 0..254   [input, base-2]
         2+                           add 2 to the get the base     [input, base]
           >                          rotate stack right            [base, input]
            :                         duplicate ToS                 [base, input, input]
             >                        rotate stack right            [input, base, input]
              R                       push 1                        [input, base, input, 1]
               &{~             }      while ToS (=remainder) is true ...
                  ^                    pop ToS                      [input, base, number]
                   ?{         }        if ToS (=quotient) ...
                     _>:<;              modify stack                [input, base, number, base]
                           m            divmod                      [input, base, quotient, remainder]
                           _+¡         else: output ToS (0) + SoS and exit
                                ^^^   pop everything but the input.
```
I'm sure this can be shortened using a while-loop instead of a for loop, but I couldn't get it to work.
[Answer]
# [Stacked](https://github.com/ConorOBrien-Foxx/stacked), 23 bytes
```
{!2[1+][n\tb all]until}
```
[Try it online!](https://tio.run/##FcgxCsIwGIDRvaf4OlURIUltf@IguUfMEK2FYqyC6SSePdbt8d45Xu@3oZRPbbzeBT@f84WYUljmPKVvccex2mgMLQc6egSt0IJRdCuUQkSw1v69hhbb9mpbeRo3DexPuLGpeS6ZwCO@yg8 "Stacked – Try It Online")
This increments (`[1+]`) **J** starting from two (`2`) while the base**J** representation of the input has no zeroes (`all` and `until`).
[Answer]
# [Perl 5](https://www.perl.org/), 52 + 2 (`-pa`) = 54 bytes
```
$\=1;while($_&&=$F[0]){$\++;$_=int$_/$\while$_%$\}}{
```
[Try it online!](https://tio.run/##K0gtyjH9/18lxtbQujwjMydVQyVeTc1WxS3aIFazWiVGW9taJd42M69EJV5fJQasQiVeVSWmtrb6/38jYyNLAwtLUzMjCwODf/kFJZn5ecX/dX1N9QwMDf7rFiQCAA "Perl 5 – Try It Online")
[Answer]
# [Ruby](https://www.ruby-lang.org/), 41 bytes
```
->n{(2..).find{!n.digits(_1).include? 0}}
```
[Attempt This Online!](https://ato.pxeger.com/run?1=bZFNSgNBEIVx6ylG3CSLDF3_VQvjLpcQETQmDMggmiwk5CRuBtFDxdPYyUwMLa6ar16_V_3o98-X9f1b9zG7-lqvFhPfjSfTdjPCuh7Xi6adby7aet4sm9Xr6A7GddM-PK3nj9dV2m57w_fZ7rma3cBtdVlNphWe7wkHogNRoXGhSUE6EB_ICh-kQgQrnHhUtY9NhQqplM2s4Igow9MfA4AF6XGGw05CC5R_xpE8RNF_Uwj6fmGYyAQxDJDNQFmIPF8nIUBKJKInG6Te50SGLJyIOa8EInEMSZyz3B0C1QRIQBGF80VHCeTIPVGdxTSYWd1CJeWdmgeSQ9GRaJ-TGFUjv-NUPBfrf7jr-vMH)
[Answer]
# [Stax](https://github.com/tomtheisen/stax), 7 [bytes](https://github.com/tomtheisen/stax/blob/master/docs/packed.md#packed-stax)
```
Ç╔ü$■╖Ö
```
[Run and debug it](https://staxlang.xyz/#p=80c98124feb799&i=1+%0A2+%0A3+%0A4+%0A5+%0A6+%0A7+%0A10+%0A17+%0A20+%0A50+%0A100+%0A777+%0A999+%0A1000+%0A1179360+%0A232792560+%0A2329089562800+%0A69720375229712477164533808935312303556800+%0A8337245403447921335829504375888192675135162254454825924977726845769444687965016467695833282339504042669808000+&a=1&m=2)
Trivial brute force approach
[Answer]
# [Pip](https://github.com/dloscutoff/pip), 12 bytes
```
T NyYaTD Uoo
```
[Try It Online!](https://dso.surge.sh/#@WyJwaXAiLCIiLCJUIE55WWFURCBVb28iLCIiLCIiLCIxMDAiXQ==)
### Explanation
An iterative solution:
```
T NyYaTD Uoo
              a is command-line input; y is ""; o is 1 (implicit)
T             Loop until
  Ny          Min(y) is truthy:
         Uo     Increment o
     aTD        Convert a to list of digits in that base
    Y           Store that list in y
           o  After the loop, output o
```
---
Alternate solution using filter, also **12 bytes**:
```
@:NaTD_FI2,m
              a is command-line input; m is 1000 (implicit)
         2,m  Range from 2 to 999 (could be 256, but using m is shorter)
       FI     Filter, keeping elements for which this function returns truthy:
   aTD_         Convert a to list of digits in base (function argument)
  N             Get the minimum
@:            Take the first element of the filtered list
```
[Try It Online!](https://dso.surge.sh/#@WyJwaXAiLCIiLCJAOk5hVERfRkkyLG0iLCIiLCIiLCIxMDAiXQ==)
]