[Question]
  [
## Challenge
Here at PPCG, we sure do like our sequences, so here's ~~a fun~~ another one.
Let's define `a(n)` as being *the smallest non-negative integer `X` that is not equal to any `a(k)` (`0 < k < n`), and `a(n-1)` and `X` do not share any decimal digits. `a(0) = 0`*
Given an input `n > 0`, output such `a(n)`.
For example, for input `n = 13`, we have `a(13) = 20`, since `a(12) = 11` and `20` is the smallest non-negative integer we haven't seen yet that doesn't share any decimal digits with `11`.
## Sequence
Here are the first 20 terms to get you started. This is sequence [A067581](http://oeis.org/A067581) on OEIS.
```
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 22, 11, 20, 13, 24, 15, 23, 14, 25
```
## Rules
* The input and output can be assumed to fit in your language's native integer type.
* The input and output can be given [in any convenient format](http://meta.codegolf.stackexchange.com/q/2447/42963).
* You can choose to either 0-index, as I am here in my examples, or 1-index for your submission. Please state which you're doing.
* Either a full program or a function are acceptable. If a function, you can return the output rather than printing it.
* If possible, please include a link to an online testing environment so other people can try out your code!
* [Standard loopholes](http://meta.codegolf.stackexchange.com/q/1061/42963) are forbidden.
* This is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'") so all usual golfing rules apply, and the shortest code (in bytes) wins.
  
[Answer]
# [Python 2](https://docs.python.org/2/), 85 bytes
-1 byte thanks to Dead Possum 
```
n=0,
exec"i=0\nwhile set(`i`)&set(`n[-1]`)or i in n:i+=1\nn+=i,;"*input()
print n[-1]
```
[Try it online!](https://tio.run/##HcrNCkBAGAXQvaf4spDxU4YdzZOgpjTllq6JEZ5@lN1ZHP@GdWcbI01TJe5xSwrTTLxXbE5OF3ILq7IfHGs9W7UfAgGFPUqjJ7I0qIa0AP0VcpX4Awzy5xh19wE "Python 2 – Try It Online")
[Answer]
# [Japt](https://github.com/ETHproductions/japt), 18 bytes
```
@A{!ZøA «As oX}a}g
```
[Test it online!](http://ethproductions.github.io/japt/?v=1.4.5&code=QEF7IVr4QSCrQXMgb1h9YX1n&input=MTM=) I've just added the `g` feature used here, but it's something I've been meaning to add for a long time (and this pushed me over the edge, because my non-`g` solution was around 35 bytes). 
### Explanation
```
@   A{!ZøA «  As oX}a}g
XYZ{A{!ZøA &&!As oX}a}gU
                           Implicit: U = input integer
   {                 }gU   Starting with [0, 1], return the U'th item generated by
XYZ{                 }     this function: (X = previous item, Y = index, Z = full array)
    A{             }a        Return the smallest non-negative integer A where
      !ZøA &&                  Z does not contain A (A is not yet in the sequence), and
             !As oX            A.toString() does not contain any of the same chars as X.
                           Implicit: output result of last expression
```
[Answer]
# [Pyth](https://github.com/isaacg1/pyth), 20 bytes
```
eu+Gf!|/GT@`eG`T0Q]0
```
[Try it online!](http://pyth.herokuapp.com/?code=eu%2BGf%21%7C%2FGT%40%60eG%60T0Q%5D0&input=13&debug=0) or [Try the test suite.](https://pyth.herokuapp.com/?code=eu%2BGf%21%7C%2FGT%40%60eG%60T0Q%5D0&input=13&test_suite=1&test_suite_input=1%0A2%0A3%0A4%0A5%0A6%0A7%0A8%0A9%0A10%0A11%0A12%0A13%0A14%0A15%0A16%0A17&debug=0)
[Answer]
## Haskell, 79 bytes
```
f 0=0
f x=[i|i<-[1..],all((/=i).f)[1..x-1],all(`notElem`show(f$x-1))$show i]!!0
```
The code is horribly inefficient. To calculate bigger values, i.e. > 12, add `f x|x<11=x` between the two lines (implemented a `g` in the TIO link). 
[Try it online!](https://tio.run/##fYwxDoMgAEV3TvFNHCSpFIZuMvYUhkSSCpICGjUpg3entW5t2u3/95I36OXee5@zAZecGCTZus01dSsYUyftfVWdpaPM0J2kWhywi@N69X3olmF8VKZ8CUrL/cCpouDZvnsWaUuNEDLt80fa/kvbrzQhQbsIidtIAEyziytKBD3BoOWMCaE@hT3EReUn "Haskell – Try It Online")
[Answer]
## JavaScript (ES6), 82 bytes
0-indexed.
```
f=(n,x=[1,p=0])=>n--?f(x[(g=k=>x[k]||(k+'').match(`[${p}]`)?g(k+1):p=k)(0)]=n,x):p
```
### Demo
```
f=(n,x=[1,p=0])=>n--?f(x[(g=k=>x[k]||(k+'').match(`[${p}]`)?g(k+1):p=k)(0)]=n,x):p
for(n = 0; n < 50; n++) {
  console.log('a(' + n + ') = ' + f(n))
}
```
[Answer]
## [Husk](https://github.com/barbuz/Husk), 18 bytes
```
!¡₁;0
ḟȯ¬V€d→⁰d-⁰N
```
A 1-indexed solution.
[Try it online!](https://tio.run/##yygtzv6vkPuoqfHhjsVGBv8VDy0Esq0NuB7umH9i/aE1YY@a1qQ8apv0qHFDii6Q8Pv/HwA "Husk – Try It Online")
*Edit:* fixed bug for +1 byte.
## Explanation
Husk's built-in iteration function `¡` has many meanings.
Here, I'm using "construct infinite list by repeatedly appending new elements computed from the existing ones".
The second line is the helper function that computes a new element:
```
ḟȯ¬V€d→⁰d-⁰N  Takes a list of existing elements, e.g. x = [0,1,...,10]
           N  The positive integers
         -⁰   with elements of x removed:        [11,12,13,...
ḟȯ            Find an element n of this list that satisfies:
        d     Digits of n.
   V          Is any of them
    €         an element of
     d        the digits of
      →⁰      the last element of x?
  ¬           Negate.
              Returns 22.
```
The first line is the main function:
```
!¡₁;0  Takes an integer k.
 ¡     Iterate adding new elements to the list
   ;0  [0]
  ₁    using the helper function,
!      take k'th element of result.
```
[Answer]
## Haskell, 78 bytes
```
n!k|r:_<-[j|j<-[1..],all(/=j)k,all(`notElem`show n)$show j]=n:r!(r:k)
(0![]!!)
```
It would be even more efficient if the second argument to `!` would not be the list of seen numbers but of unseen numbers. But I can't do that without using more bytes.
[Try it online!](https://tio.run/##HYwxCoQwEAB7X7ELFgmo51kGU/oKCZpC0WSzShRs/HvutJmZahZ7@IkoJUZ/RzW0Ze9u9@e3qkxhicRHO@nfGnk7O5rCeCzbBSzz185oVhFFVF5msxY19gZRpmBXBg17XPmEHILdYYZn29Qm/QA "Haskell – Try It Online")
[Answer]
## Mathematica 115 Bytes
Still room to golf this down - and maybe use recursion (thus speeding it up).
```
(For[z={0};i=1,Length@z<#,
For[i=1,!FreeQ[z,i]||!DisjointQ@@IntegerDigits/@{l,i},i++];
z~AppendTo~i;l=Last@z;
];l)&
```
Original verbose code, with the same basic idea:
```
MakeSequenceA067581[n_]:=Module[{list={0}, innerCounter=1},
While[Length@list<n,
innerCounter=1;
(* inner loop *)While[Or[MemberQ[list,innerCounter],Intersection[IntegerDigits[Last@list],IntegerDigits[innerCounter]]!={}],innerCounter++];
AppendTo[list,innerCounter];
];
list
]
```
]