[Question]
  [
Some divisors of positive integers really hate each other and they don't like to share one or more common digits. 
Those integers are called *Hostile Divisor Numbers* (***HDN***) 
**Examples** 
Number `9566` has `4` divisors: `1, 2, 4783 and 9566`  
(as you can see, **no two of them share the same digit**).  
Thus, **9566** is a **H**ostile **D**ivisor **N**umber 
Number `9567` is **NOT *HDN*** because its divisors (`1, 3, 9, 1063, 3189, 9567`) share some common digits. 
Here are the first few ***HDN*** 
```
1,2,3,4,5,6,7,8,9,23,27,29,37,43,47,49,53,59,67,73,79,83,86,87,89,97,223,227,229,233,239,257,263,267,269,277,283,293,307,337...       
```
  
**Task** 
The above list goes on and your task is to find the *nth* ***HDN*** 
**Input** 
A positive integer `n` from `1` to `4000` 
**Output** 
The `nth` ***HDN*** 
**Test Cases** 
here are some **1-indexed** test cases.  
Please state which indexing system you use in your answer to avoid confusion. 
```
input -> output     
 1        1     
 10       23       
 101      853     
 1012     26053     
 3098     66686      
 4000     85009      
```
This is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'"), so the lowest score in bytes wins. 
**EDIT** 
Good news!
I submitted my sequence to OEIS and...  
Hostile Divisor Numbers are now OEIS [A307636](https://oeis.org/A307636)
  
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E/wiki/Commands), ~~12~~ 10 [bytes](https://github.com/Adriandmen/05AB1E/wiki/Codepage)
```
µNNÑ€ÙSDÙQ
```
-2 bytes thanks to *@Emigna*.
1-indexed
[Try it online](https://tio.run/##yy9OTMpM/f//0FY/v8MTHzWtOTwz2OXwzMD//w0NDAE) or [verify most test cases](https://tio.run/##yy9OTMpM/V9Waa@k8KhtkoKSfeX/Q1v9/A5PfNS05vDMYJfDMwP/1@roHdr6P9pQx9AAiECUoVEsAA) (last two test cases are omitted, since they time out).
**Explanation:**
```
µ           # Loop while the counter_variable is not equal to the (implicit) input yet:
 N          #  Push the 0-based index of the loop to the stack
  NÑ        #  Get the divisors of the 0-based index as well
            #   i.e. N=9566 → [1,2,4783,9566]
            #   i.e. N=9567 → [1,3,9,1063,3189,9567]
    €Ù      #  Uniquify the digits of each divisor
            #   → ["1","2","4783","956"]
            #   → ["1","3","9","1063","3189","9567"]
      S     #  Convert it to a flattened list of digits
            #   → ["1","2","4","7","8","3","9","5","6"]
            #   → ["1","3","9","1","0","6","3","3","1","8","9","9","5","6","7"]
       D    #  Duplicate this list
        Ù   #  Unique the digits
            #   → ["1","2","4","7","8","3","9","5","6"]
            #   → ["1","3","9","0","6","8","5","7"]
         Q  #  And check if it is still equal to the duplicated list
            #   → 1 (truthy)
            #   → 0 (falsey)
            #  And if it's truthy: implicitly increase the counter_variable by 1
            # (After the loop: implicitly output the top of the stack,
            #  which is the pushed index)
```
[Answer]
# [Python 2](https://docs.python.org/2/), 104 bytes
```
n=input()
x=1
while n: 
 x=i=x+1;d={0};c=1
 while i:m=set(`i`*(x%i<1));c*=d-m==d;d|=m;i-=1
 n-=c
print x
```
[Try it online!](https://tio.run/##JcpBCsIwEAXQfU6RjZBUAkZXdvx3KSSFDpgxaIoj6tmj4vq9@mjLRfa9C1jq2pw3imjuC59nK6M1VsHQbaSM5@5N6Yv2rzwW3ObmJp4Gpxs@Re8pDcihAJnyC4U4/L4EJFOvLM1q74fjBw "Python 2 – Try It Online")
0-indexed.
[Answer]
# JavaScript (ES6), 78 bytes
1-indexed.
```
n=>eval("for(k=0;n;n-=!d)for(s=d=++k+'';k%--d||d*!s.match(`[${s+=d,d}]`););k")
```
[Try it online!](https://tio.run/##ZcndCsIgGADQ@57CjWKauZ9GEMjXi0Qw8dtWaRpz7Kb17EZQN3V5OFc1qaCHy30UzmMbO4gODu2kLE07P1ADpXTSCUiQvR0AgXPDs0yalRA4z7hOQn5Toz7T5rh8BA64weepYZJJk7KovQvetrn1Pe1oRQhhjBQFqRY/U35nW/9V9an9ro4v "JavaScript (Node.js) – Try It Online")
### Faster version, 79 bytes
```
n=>{for(k=0;n;n-=!d)for(s=d=++k+'';k%--d||d*!s.match(`[${s+=d,d}]`););return k}
```
[Try it online!](https://tio.run/##bcvdCoIwAEDh@55iQuHWmk6lYYz1IhEoTvuZbbFZN@qzLyK7yS4PH@daPktX2cu9I9rI2jfCa7HvG2OhEpRrrokIJHq3E1JgrHAYcrUiRA6DXAcuupVddYbFYdk7LORGjscCccRt3T2sBmr0ldHOtHXUmhNsYAIAQAjEMUgWP0K/kmYzSibKt38snTZGZ5rRXf5RxljO/As "JavaScript (Node.js) – Try It Online")
### How?
Given an integer \$k>0\$, we build the string \$s\$ as the concatenation of all divisors of \$k\$.
Because \$k\$ is always a divisor of itself, \$s\$ is initialized to \$k\$ (coerced to a string) and the first divisor that we try is \$d=k-1\$.
For each divisor \$d\$ of \$k\$, we test whether any digit of \$d\$ can be found in \$s\$ by turning \$d\$ into a character set in a regular expression.
*Examples*
* \$s=\text{"}956647832\text{"}\$, \$d=1\$ → `"956647832".match(/[1]/)` is falsy
* \$s=\text{"}9567\text{"}\$, \$d=3189\$ → `"9567".match(/[3189]/)` is truthy
### Commented
*This is the version without `eval()`, for readability*
```
n => {                   // n = input
  for(                   // for() loop:
    k = 0;               //   start with k = 0
    n;                   //   go on until n = 0
    n -= !d              //   decrement n if the last iteration resulted in d = 0
  )                      //
    for(                 //   for() loop:
      s =                //     start by incrementing k and
      d = ++k + '';      //     setting both s and d to k, coerced to a string
      k % --d ||         //     decrement d; always go on if d is not a divisor of k
      d *                //     stop if d = 0
      !s.match(          //     stop if any digit of d can be found in s
        `[${s += d, d}]` //     append d to s
      );                 //
    );                   //   implicit end of inner for() loop
                         // implicit end of outer for() loop
  return k               // return k
}                        //
```
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 10 bytes
```
ÆDQ€FQƑµ#Ṫ
```
[Try it online!](https://tio.run/##y0rNyan8//9wm0vgo6Y1boHHJh7aqvxw56r//w0NDAE "Jelly – Try It Online")
-1 byte thanks to ErikTheOutgolfer
Takes input from STDIN, which is unusual for Jelly but normal where `nfind` is used.
```
ÆDQ€FQƑµ#Ṫ  Main link
         Ṫ  Get the last element of
        #   The first <input> elements that pass the filter:
ÆD          Get the divisors
  Q€        Uniquify each (implicitly converts a number to its digits)
    F       Flatten the list
     QƑ     Does that list equal itself when deduplicated?
```
2-indexed
[Answer]
# [Perl 6](http://perl6.org/), 53 bytes
```
{(grep {/(.).*$0/R!~~[~] grep $_%%*,1..$_},^∞)[$_]}
```
[Try it online!](https://tio.run/##K0gtyjH7n1upoJamYPu/WiO9KLVAoVpfQ09TT0vFQD9Isa4uui5WASysEq@qqqVjqKenEl@rE/eoY55mtEp8bO3/4sRKBQ2gsJGppp2dnlrafwA "Perl 6 – Try It Online")
1-indexed.
`/(.).*$0/` matches any number with a repeated digit.
`grep $_ %% *, 1 .. $_` returns a list of all divisors of the number `$_` currently being checked for membership in the list.
`[~]` concatenates all of those digits together, and then `R!~~` matches the string on the right against the pattern on the left. (`~~` is the usual match operator, `!~~` is the negation of that operator, and `R` is a metaoperator that swaps the arguments of `!~~`.)
[Answer]
# [Python 2 (PyPy)](http://pypy.org/), ~~117~~ 114 bytes
Uses 1-indexing
```
k=input();n=0;r=range
while k:n+=1;k-=1-any(set(`a`)&set(`b`)for a in r(1,n+1)for b in r(1,a)if n%a<1>n%b)
print n
```
[Try it online!](https://tio.run/##NY5BC4JAFITv@yseguFigttR22527dIPcLVnLsZzea3U/npTKxiY4WNgxgXfj3TIXHBhbscbggaOomgetCU3@USWpPOSNRu6o3j19oEwFJRqVQ6ZVpmhkDzRJ7Wp5W4LTS27kcGAJeBE7SlVG2j@wEjbAcXmqE4UN1I4tuSB5mVW/BauPGEhADyH1QDwjS2s/8SaW3Qeqsu5Yh75W2gYzTArofJF6gM "Python 2 (PyPy) – Try It Online")
[Answer]
# Wolfram Language 103 bytes
Uses 1-indexing.
I'm surprised it required so much code.
```
(k=1;u=Union;n=2;l=Length;While[k<#,If[l[a=Join@@u/@IntegerDigits@Divisors@#]==l@u@a&@n,k++];n++];n-1)&
```
[Answer]
# [PowerShell](https://github.com/TryItOnline/TioSetup/wiki/Powershell), 112 bytes
```
for($a=$args[0];$a-gt0){$z=,0*10;1..++$n|?{!($n%$_)}|%{"$_"|% t*y|sort -u|%{$z[+"$_"]++}};$a-=!($z|?{$_-ge2})}$n
```
[Try it online!](https://tio.run/##FYxLCsMgFACvkoYnxFiDdhukBwlBXFi7CFrUUOrn7NZsZ5j5uK/24a2Po7WX8xMoAcqbsLF9BUVNZDhDEnc2c7byZSEEbHnm2wQWgcS1oDyCHAsa4vwrwfk40LNDSBu5xE5IrddJ9CT1EiQ1@lFxBdta44z/AQ "PowerShell – Try It Online")
Takes 1-indexed input `$args[0]`, stores that into `$a`, loops until that hits `0`. Each iteration, we zero-out a ten-element array `$z` (used to hold our digit counts). Then we construct our list of divisors with `1..++$n|?{!($n%$_)}`. For each divisor, we cast it to a string `"$_"`, cast it `t`oCharArra`y`, and `sort` those digits with the `-u`nique flag (because we don't care if a divisor itself has duplicate digits). We then increment the appropriate digit count in `$z`. Then, we decrement `$a` only if `$z` contains `0`s and `1`s (i.e., we've found an HDN). If we've finished our `for` loop, that means we found the appropriate number of HDNs, so we leave `$n` on the pipeline and output is implicit.
[Answer]
# [Python 3](https://docs.python.org/3/), 115 bytes
1-indexed
```
f=lambda n,x=1,s="",l="",d=1:n and(d>x+1and f(n-1,x+1)or{*s}&{*l}and f(n,x+1)or f(n,x,s+l,(1-x%d)*str(d),d+1))or~-x
```
[Try it online!](https://tio.run/##bU9BTsMwELznFatWILt1UF3EgUjhAgdOXHiBi53WkmNH3i1NVZWvh62aohywZO/szOxo3R1pl@LjMIdYwfvbBwIl2KZiDn0Fr/ucXaRwBHJIzkLctxuXWcQKPin7uIXUwNefDZ2LYP23x5S5bj0hm8PUfGUvKBgkYJ5zbyO@AU9wMAjmxilwbUccPSbQzuWDR8e59p8Nx6nCt13KBHjEgu8DOsqO90SfYvCtJ6FXfOTQ1MG0G2sgqr7WCuvZTIXLY2tdRTDRCvvSLzUDaEQsteJGpnxa4Pn@tAjnURjpK1S4DErosr@zcsGLCyuVZZ0NP2U/dPwTEo14lrK4Yb2aNnrSrJ@kHH4B "Python 3 – Try It Online")
This uses a *lot* of recursion; even with increased recursion limit, it can't do `f(30)`. I think it might be golfable further, and I tried finding something to replace the `(1-x%d)` with, but couldn't come up with anything (`-~-x%d` has the wrong precedence). Any bytes that can be shaved off are greatly appreciated.
# How it works
```
# n: HDNs to go
# x: Currently tested number
# s: String of currently seen divisor digits
# l: String of digits of last tried divisor if it was a divisor, empty string otherwise
# d: Currently tested divisor
f=lambda n,x=1,s="",l="",d=1:n and(                    # If there are still numbers to go
                             d>x+1and f(n-1,x+1)or     # If the divisors have been
                                                       #  exhausted, a HDN has been found
                             {*s}&{*l}and f(n,x+1)or   # If there were illegal digits in
                                                       #  the last divisor, x isn't a HDN
                             f(n,x,s+l,(1-x%d)*str(d),d+1)
                                                       # Else, try the next divisor, and
                                                       #  check this divisor's digits (if
                                                       #  if is one) in the next call
                             )or~-x                    # Else, return the answer
```
[Answer]
# [Wolfram Language (Mathematica)](https://www.wolfram.com/wolframscript/), 74 bytes
```
Nest[1+#//.a_/;!Unequal@@Join@@Union/@IntegerDigits@Divisors@a:>a+1&,0,#]&
```
[Try it online!](https://tio.run/##Fcc9C8IwEIDh3X8hgS6NJlEHP7Dc0EUHcelURA5J64G9YHK6iL89Vnjh4R1Q7n5AoRvmbp9PPknrSmXMHK9mN23YP1/4ADgGYoCGKbCBA4vvfaypJ0lQ05tSiAlwW2HpCm21uhT5HImlVbOqg3ENTD5OOzv2xy300m7WemWt/eYf "Wolfram Language (Mathematica) – Try It Online")
[Answer]
# [Brachylog](https://github.com/JCumin/Brachylog) (v2), 14 bytes
```
;A{ℕfdᵐc≠&}ᶠ⁽t
```
[Try it online!](https://tio.run/##ASoA1f9icmFjaHlsb2cy//87QXvihJVmZOG1kGPiiaAmfeG2oOKBvXT//zUw/1o "Brachylog – Try It Online")
Function submission; input from the left, output to the right. (The TIO link contains a command-line argument to run a function as though it were a full program.)
## Explanation
"Is this a hostile divisor number?" [decision-problem](/questions/tagged/decision-problem "show questions tagged 'decision-problem'") code:
```
ℕfdᵐc≠
ℕ       number is ≥0 (required to match the question's definition of "nth solution")
 f      list of all factors of the number
   ᵐ    for each factor
  d       deduplicate its digits
    c   concatenate all the deduplications with each other
     ≠  the resulting number has no repeated digits
```
This turned out basically the same as @UnrelatedString's, although I wrote it independently.
"nth solution to a [decision-problem](/questions/tagged/decision-problem "show questions tagged 'decision-problem'")" wrapper:
```
;A{…&}ᶠ⁽t
    &      output the successful input to
  {  }ᶠ    the first n solutions of the problem
       ⁽   taking <n, input> as a pair
;A         form a pair of user input and a "no constraints" value
        t  take the last solution (of those first n)
```
This is one of those cases where the wrapper required to produce the nth output is significantly longer than the code required to test each output in turn :-)
I came up with this wrapper independently of @UnrelatedString's. It's the same length and works on the same principle, but somehow ends up being written rather differently. It does have more potential scope for improvement, as we could add constraints on what values we were looking at for free via replacing the `A` with some constraint variable, but none of the possible constraint variables save bytes. (If there were a "nonnegative integer" constraint variable, you could replace the `A` with it, and then save a byte via making the the `ℕ` unnecessary.)
[Answer]
# Java 10, ~~149~~ ~~139~~ ~~138~~ ~~126~~ ~~125~~ ~~120~~ 119 bytes
```
n->{int r=0,i,d;for(;n>0;n-=d){var s="1";for(r+=d=i=1;i++<r;)if(r%i<1){d=s.matches(".*["+i+"].*")?0:d;s+=i;}}return r;}
```
-10 bytes by using `.matches` instead of `.contains` per digit, inspired by [*@Arnauld*'s JavaScript answer](https://codegolf.stackexchange.com/a/185110/52210).  
-5 bytes thanks to *@ValueInk*  
-1 byte thanks to *@ceilingcat*
1-indexed
[Try it online.](https://tio.run/##ZZBBbsIwEEX3nGJkqZKNSeS0XbQY0xOUDUvKwsQJHZo4yDZIVZSzp06aBbQbS29mZL3/T/qqk5P56vNKew/vGm07A0AbClfqvIDNgABVY4@Q0zgHy2QcdbP4@KAD5rABCwp6m6zb4cApscCFkWXjqLRrIW2iDGuv2oFXJCPjwnFlFKpMIucrJxmW1D3gKmOtUT6tdcg/C09JOt8Rjpzs0zlhb2JppOcKZde5IlycBSe7Xg4q58uhiiqT0bVBA3UMQ7fBoT3u9qDZb5JQ@ECzMcMEj7eQiXvK/uDd8ZN4fbnlZyHEv3ZGl3E9lIOTxvbbh6JOm0tIz9EwVJbGmMuPQLhNY9Fs@qfrfwA)
**Explanation:**
```
n->{                 // Method with integer as both parameter and return-type
  int r=0,           //  Result-integer, starting at 0
      i,             //  Index integer
      d;             //  Decrement integer
  for(;n>0;          //  Loop until the input `n` is 0:
      n-=d){         //    After every iteration: decrease `n` by the decrement integer `d`
    var s="1";       //   Create a String `s`, starting at "1"
    for(r+=d=i=1;    //   (Re)set the decrement and index integers to 1,
                     //   and increase the result by 1 as well
        i++<r;)      //   Inner loop `i` in the range [2, r]:
      if(r%i<1){     //    If `r` is divisible by `i`:
        d=s.matches(".*["+i+"].*")?
                     //     If string `s` contains any digits also found in integer `i`:
           0         //      Set the decrement integer `d` to 0
          :d;        //     Else: leave `d` unchanged
        s+=i;}}      //     And then append `i` to the String `s`
  return r;}         //  After the loops, return the result `r`
```
[Answer]
# [Brachylog](https://github.com/JCumin/Brachylog), 16 bytes
```
g{∧0<.fdᵐc≠∧}ᵘ⁾t
```
[Try it online!](https://tio.run/##SypKTM6ozMlPN/pfXa6koGunoFRu/6htw6Ompoe7Omsfbp3wP736UcdyAxu9tBQgL/lR5wIgFygx41HjvpL//6MNdQwNgAhEGRrpGBtYWuiYGBgYxAIA "Brachylog – Try It Online")
Very slow, and twice as long as it would be if this was a [decision-problem](/questions/tagged/decision-problem "show questions tagged 'decision-problem'"). 1-indexed.
```
                    The output
               t    is the last
             ᵘ⁾     of a number of unique outputs,
g                   where that number is the input,
 {          }       from the predicate declaring that:
     .              the output
    <               which is greater than
   0                zero
  ∧                 (which is not the empty list)
      f             factorized
        ᵐ           with each factor individually
       d            having duplicate digits removed
          ≠         has no duplicate digits in
         c          the concatenation of the factors
           ∧        (which is not the output).
```
[Answer]
# [Japt](https://github.com/ETHproductions/japt) v2.0a0, 17 bytes
```
_=â ®sâÃ¬UµZ¶â}f1
```
[Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=2.0a0&code=Xz3iIK5z4sOsVbVatuJ9ZjE&input=MTAx)
Port of [this Brachylog answer](https://codegolf.stackexchange.com/a/185158/8340).
Credit: 4 bytes savings total thanks to Shaggy who also suggested there was a better solution leading to many more bytes :)
---
Original answer 28 byte approach:
```
Èâ¬rÈ«è"[{Y}]" ©X+Y}Xs)«U´Ãa
```
[Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&flags=LW0&code=yOKscsir6CJbe1l9XSIgqVgrWX1YcymrVbTDYQ&input=WzEsMTAsMTAxXQ)
Port of [this JavaScript answer](https://codegolf.stackexchange.com/a/185110/8340).
[Answer]
# [Perl 5](https://www.perl.org/) `-p`, 66 bytes
```
map{1while(join$",map{$\%$_==0&&$_}1..++$\)=~/(\d).* .*\1/}1..$_}{
```
[Try it online!](https://tio.run/##K0gtyjH9/z83saDasDwjMydVIys/M09FSQckohKjqhJva2ugpqYSX2uop6etrRKjaVunrxGToqmnpaCnFWOoDxIHylb//29oYPgvv6AkMz@v@L9uAQA "Perl 5 – Try It Online")
1 indexed
[Answer]
# [Husk](https://github.com/barbuz/Husk), 10 bytes
```
!fȯS=uṁdḊN
```
[Try it online!](https://tio.run/##yygtzv7/XzHtxPpg29KHOxtTHu7o8vv//7@hAQA "Husk – Try It Online")
Same method as Jelly.
# [Husk](https://github.com/barbuz/Husk), 19 bytes
```
!f(Λo¬Fnfo¬Eπ2mdḊ)N
```
[Try it online!](https://tio.run/##yygtzv7/XzFN49zs/ENr3PLSgKTr@Qaj3JSHO7o0/f7//29oAAA "Husk – Try It Online")
The more manual cehcker.
[Answer]
# [Vyxal](https://github.com/Vyxal/Vyxal), 10 bytes
```
λKvUfÞu;ȯt
```
[Try it Online!](https://vyxal.pythonanywhere.com/#WyIiLCIiLCLOu0t2VWbDnnU7yK90IiwiIiwiMTAxIl0=)
[Answer]
# [Icon](https://github.com/gtownsend/icon), 123 bytes
```
procedure f(n)
k:=m:=0
while m<n do{
k+:=1
r:=0
s:=""
every k%(i:=1 to k)=0&(upto(i,s)&r:=1)|s++:=i
r=0&m+:=1}
return k
end
```
[Try it online!](https://tio.run/##TY7RCsIwDEXf8xWh4GjZHlbBl2I/RraKpbYdWecQ9dtn5hiYp8C5Obm@y2lZBsqd6ydyeJVJQTA2GtvCfPN3h/GcsM8vCLWxGmgFo7FCgHs4emI4SM8AS8agbFvJaShZ@mZUFWe1eo81H3ogZnFVfIBcmShhAJf6v9/x4pNUgDybevceT1wAZ/LFsRgFGhQNV/VqS29E6FbvhFeF6uf/Ag "Icon – Try It Online")
1-indexed. Really slow for big inputs.
[Answer]
# [Perl 6](https://github.com/nxadm/rakudo-pkg), 74 bytes
```
{(grep {!grep *>1,values [(+)] map *.comb.Set,grep $_%%*,1..$_},1..*)[$_]}
```
0-indexed. Only the first three cases are listed on TIO since it's too slow to test the rest.
[Try it online!](https://tio.run/##K0gtyjH7n1upoJamYPu/WiO9KLVAoVoRTGnZGeqUJeaUphYrRGtoa8Yq5CYCBfWS83OT9IJTS3TAilTiVVW1dAz19FTia0GUlma0Snxs7X9rrrT8IgUbAwVLBUMDAzuFai7O4sRKBSWVeAVdIC8NqLFWyZqr9j8A "Perl 6 – Try It Online")
[Answer]
# [Ruby](https://www.ruby-lang.org/), ~~110~~ ~~97~~ ~~92~~ 84 bytes
-13 bytes by leveraging [@Arnauld's JavaScript regex check](https://codegolf.stackexchange.com/a/185110/52194).
-5 bytes for swapping out the `times` loop for a decrementer and a `while`.
-8 bytes by ditching `combination` for something more like the other answers.
```
->n{x=0;n-=1if(s='';1..x+=1).all?{|a|x%a>0||(e=/[#{a}]/!~s;s+=a.to_s;e)}while n>0;x}
```
[Try it online!](https://tio.run/##FcrRCsIgFADQX1nE2MaY8/Yq1z5kjTAwE8Si65ih9utG5/m8t9unGrzUSfoUkQs/Idh7T9h1AhiLI8LAlHPnlFWOrZI8517jvByTKut8@JKgERULzysJPZT9YZ1uvOQilvraAjVmMTrQP9i1AofTDw "Ruby – Try It Online")
[Answer]
# [J](http://jsoftware.com/), ~~87~~ 59 bytes
*-28 bytes thanks to FrownFrog*
```
0{(+1,1(-:~.)@;@(~.@":&.>@,i.#~0=i.|])@+{.)@]^:(>{:)^:_&0 0
```
[Try it online!](https://tio.run/##y/qvpKeepmBrpaCuoKNgoGAFxLp6Cs5BPm7/Dao1tA11DDV0rer0NB2sHTTq9ByUrNT07Bx0MvWU6wxsM/VqYjUdtKuBsrFxVhp21VaacVbxagYKBv81uVKTM/IVDBVsFdKAJIRnZAzhGkD5FqYwAbgKMwOEmJHCfwA "J – Try It Online")
## original
# [J](http://jsoftware.com/), 87 bytes
```
[:{:({.@](>:@[,],([:(-:~.)[:-.&' '@,/~.@":"0)@((]#~0=|~)1+i.)@[#[)}.@])^:(#@]<1+[)^:_&1
```
[Try it online!](https://tio.run/##RYvNCsIwEITvPsXSQpOl6ZpUFFmsBARPnrwuqQexqBcfoJpXj4H6c5hhvmHmngpSA3QMCgxY4KyGYHc87JPwyHokH/SWvZhgtLBuOBIKN1QpUN7MI/mCC4te61BG2z0juvpG6KUUfOUz9qxLHzaulhxPlUs4u5yvD3DQwZB9onYxof3wevktfouV/XctpDc "J – Try It Online")
Yikes.
This is atrociously long for J, but I'm not seeing great ways to bring it down.
## explanation
It helps to introduce a couple helper verbs to see what's happening:
```
d=.(]#~0=|~)1+i.
h=. [: (-:~.) [: -.&' '@,/ ~.@":"0
```
* `d` returns a list of all divisors of its argument
* `h` tells you such a list is hostile. It stringifies and deduplicates each number `~.@":"0`, which returns a square matrix where shorter numbers are padded with spaces. `-.&' '@,/` flattens the matrix and removes spaces, and finally `(-:~.)` tells you if *that* number has repeats or not.
With those two helpers our overall, ungolfed verb becomes:
```
[: {: ({.@] (>:@[ , ] , h@d@[ # [) }.@])^:(#@] < 1 + [)^:_&1
```
Here we maintain a list whose head is our "current candidate" (which starts at 1), and whose tail is all hostile numbers found so far.
We increment the head of the list `>:@[` on each iteration, and only append the "current candidate" if it is hostile `h@d@[ # [`. We keep doing this until our list length reaches 1 + n: `^:(#@] < 1 + [)^:_`.
Finally, when we're done, we return the last number of this list `[: {:` which is the nth hostile number.
]