[Question]
  [
Given 2 non-negative integers as input, output a non-negative integer that cannot be created through any mathematical operators on the 2 inputs.
For example, given inputs `2` and `3`, `6, 0, 5, 1, 9, 8, 23, 2` are all invalid outputs.
Operations that must be taken into account are:
```
Addition        (a + b)
Subtraction     (a - b) and (b - a)
Multiplication  (a * b)
Division        (a / b) and (b / a)
Modulus         (a % b) and (b % a)
Exponentiation  (a ** b) and (b ** a)
Bitwise OR      (a | b)
Bitwise XOR     (a ^ b)
Bitwise AND     (a & b)
Concatenation   (a.toString() + b.toString()) and (b.toString() + a.toString())
```
In cases where an operation would lead to a non-integer (such as 2 / 3), always floor. So `2 / 3 = 0`
Assume any invalid operations (such as dividing by 0) result in 0.
## Input
2 non-negative integers.
[Standard I/O methods](https://codegolf.meta.stackexchange.com/questions/2447/default-for-code-golf-input-output-methods) are accepted
You can assume the input will always be within a handleable range for your given language, however remember [standard loopholes](https://codegolf.meta.stackexchange.com/questions/1061/loopholes-that-are-forbidden-by-default) still apply.
## Output
Any non-negative integer that can not be created via any of the above operations on the 2 inputs.
## Testcases
```
Input  -> Invalid outputs
2, 3   -> 0, 1, 2, 3, 5, 6, 8, 9, 23, 32
0, 0   -> 0
17, 46 -> 0, 2, 12, 17, 29, 63, 782, 1746, 4617, 18487710785295216663082172416, 398703807810572411498315063055075847178723756123452198369
6, 6   -> 0, 1, 6, 12, 36, 66, 46656
1, 1   -> 0, 1, 2, 11
```
## Scoring
This is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'") so fewest bytes wins!
  
[Answer]
# [Retina](https://github.com/m-ender/retina), 3 bytes
```
.
1
```
[Try it online!](https://tio.run/nexus/retina#@6/HZfj/v4GCAQA "Retina – TIO Nexus")
Takes inputs separated by space (or any single non-newline character)
Replaces all digits with `1`, and joins the resulting numbers with another `1`.
### Proof of correctness
*Courtesy of [Martin Ender](https://codegolf.stackexchange.com/users/8478/martin-ender)*
* This operation computes a result with one more digit than the number of digits of the two numbers together; the only operation that could produce a result so big is exponentiation.
* The result is a repunit (a number whose digits are all 1).
* ["It is know [sic] [...] that a repunit in base 10 cannot [...] be a perfect power."](https://mathoverflow.net/a/132025/56581) This means that this result can't be produced by exponentiation either.
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 3 bytes
```
+Æn
```
[Try it online!](https://tio.run/##y0rNyan8/1/7cFve////Dc3/m5gBAA "Jelly – Try It Online")
Explanation:
```
+Æn Arguments: x, y
+                            x + y.
 Æn Find a prime larger than
```
[Answer]
# [Python 2](https://docs.python.org/2/), 8 bytes
```
'1'.join
```
[Try it online!](https://tio.run/nexus/python2#TY1LCsMgFEXHZhWPTKJBipaOAhl0HWnAErRYRMOrBV29tU0KmZ5zP2a8lU52p2ewvpiAkMF6wLt/aCovbGjgC9MBCiEqJqhfbxcljFVFauikkuIqq5mxvzwfZK4ybdIaSH3/@5n2FQ57Yx6gIWTFWgOaeK5xopONlDUbbK/OwRIQ9RLb8gE "Python 2 – TIO Nexus")
Takes a list of two number strings as inputs, outputs a single number string. Concatenates the numbers with a `1` in the middle.
The result has too many digits for anything but exponent. Note that the output for `(x,y)` has one more digit than `x` and `y` combined, unless `x` or `y` is 0. For exponent, we check we check that this means `x**y` never matches. 
* If `x` is 0 or 1, then so is `x**y`, which is too small
* If `y<=1`, then `x**y<=x` is too small
* If `y==2`, then `x**2` must have two more digits than `x`. This happens up to `x=316`, and we can check none of those work.
* If `y==3`, then `x**3` must have two more digits than `x`. This happens up to `x=21`. We can check that none of those work.
* If `3<y<13`, then `x**y` quickly gets too long. It only plausible has the right number of digits for `x<=25`, and we can check these.
* If `y>=14`, then `x**y` is too long even for the smallest possible `x==2`.
[Answer]
## CJam (7 chars)
```
{+))m!}
```
This creates a number `(a+b+2)!` which is larger than the largest related number in almost all cases.
It's fairly obvious that the largest related number must be one of `a ** b`, `b ** a`, `concat(a, b)`, `concat(b, a)`.
If we consider logarithms, we find that
* `log(a ** b) = b log a`
* `log(concat(a, b)) ~= (log a) + log (b)`
* `log((a + b + 2)!) ~= (a + b + 2) log (a + b + 2) - (a + b + 2)`
Thus asymptotically it's larger, and we only need to worry about a few small cases. In fact, the only case for which the value output is not larger than all related numbers is `0, 1` (or `1, 0`), for which it gives `6` and the largest related number is `10`.
[Answer]
# Python, ~~115~~ ~~95~~ 79 bytes
Stupid straightforward solution. Feel free to outgolf me.
```
x,y=input()
f=lambda x,y:[x+y,x*y,x**y,int(`x`+`y`)]
print max(f(x,y)+f(y,x))+1
```
+12 bytes because of stupid `x/0`.  
-20 bytes thanks to @RobinJames  
-16 bytes thanks to @tehtmi
[Answer]
## JavaScript (ES6), 15 bytes
Takes input in currying syntax.
```
a=>b=>a*a+b*b+2
```
**a² + b² + 1** would fail for many entries such as **3² + 5² + 1 = 35** or **7² + 26² + 1 = 726** (concatenation). **a² + b² + 2** should be safe. This was exhaustively tested for **0 ≤ a ≤ b ≤ 50000**.
### Demo
```
let f =
a=>b=>a*a+b*b+2
for(a = 0; a < 5; a++) {
  for(b = a; b < 5; b++) {
    console.log(a, b, f(a)(b));
  }
}
for(i = 0; i < 10; i++) {
  a = Math.random() * 1000 | 0;
  b = Math.random() * 1000 | 0;
  console.log(a, b, f(a)(b));
}
```
[Answer]
# Python, 27 bytes
```
lambda a,b:(a+b+9)**(a+b+9)
```
Outputs a number larger than all the related numbers. 
[Try it online!](https://tio.run/nexus/python2#@59mm5OYm5SSqJCok2SlkaidpG2pqaUFZfyv0Km0zcwrKC3R0OQqKMrMK1FI0wCKaf431DECAA)
-1 byte thanks to Kevin Cruijssen.  
-2 bytes thanks to Dead Possum.
[Answer]
## Python 2, 25 bytes
```
lambda x,y:int(`x`+`y`)+3
```
Concatenates and adds 3
[Try it online](http://ideone.com/rQJt88)
[Answer]
# [Brachylog](https://github.com/JCumin/Brachylog), 3 bytes
```
+<ṗ
```
[Try it online!](https://tio.run/##SypKTM6ozMlPN/pfXa6koGunoFRu/6htw6Ompoe7Omsfbp3wX9vm4c7p//9HRxvpGMfqRBvoGABJQ3MdEzMgbaYDIg11DGNjAQ "Brachylog – Try It Online")
Nothing new here.
```
       The output
  ṗ    is a prime number
 <     which is strictly greater than
+      the sum of the elements of
       the input.
```
Now, to figure out how to find an unrelated string...
[Answer]
## [QBIC](https://drive.google.com/drive/folders/0B0R1Jgqp8Gg4cVJCZkRkdEthZDQ), 8 bytes
Man, so many cool ways to just take these numbers and get an unrelated number. I just had to try a few, to see how QBIC'd keep up. The shortest one is a port of xnor's Python answer, concatenating the numbers with a 1 in the middle:
```
?;+@1`+;
```
All ones, a port of Leo's Retina answer:
```
[0,_l;|+_l;||Z=Z+@1
```
Finding the next bigger prime:
```
c=:+:+1≈µc|+1|c=c+1]?c
```
[Answer]
# JS (ES6), 12 bytes
```
x=>x.join`1`
```
Same algorithm as [this python answer](https://codegolf.stackexchange.com/questions/122442/find-an-unrelated-number/122523#122523). Takes input as an array of ints.
[Answer]
# [Braingolf](https://github.com/gunnerwolf/braingolf/), 4 bytes
```
9&+^
```
[Try it online!](https://tio.run/nexus/python3#1Rrbbts29N1fwaXtJDWOa2d7cuJuLx2wh2HDMBQDHDdQZTrWKksaKbsONuzXs8P7oUQldjMk2ENbkzz3O6muWLUh/JaTfFNXrCEpu9ldDFZid7Uts6aqCnvG6HKbUX2aVUVBsyavSnu@pH9u4VivKj6q02bt1jVlaVMxu5E3lEn6doel5bLauCUQG2RFyjnhknYs/06mAwK8VuT6@oY2QGVzfR1zWqyGJC@XdC/PCclXJOd5yZu0zGgsT4aEF3lGNQABBs2WlaS5rakkkMRWplEuQTHdEZBijVtUtftN6yQZIJJS0FGfgIMBkMo@cTIj88XFINsyJjdgPb4Y0HIJP35ICw7614xyynbU7WRVuQMh3QajsOYIgjcsL2/cmvIsrdH5Zls0eQ0wiAj/lNdula@QCDwvKAZdFRL0NyacXVQVwrthlC5v3VqcSqspzSTPrNpKaicnWpJsnTK9Hgi3Cq81MZdeatit9qbcwiYW/GFN9xmtG/I@Lbb0HWMVm2IgKYciq@KPxiYOh2SVg9khJiiYdCnZaSwDEvsQWj7wqfT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kzUvZYHpoavrC2R0MHnmsvWSMKqRtgn9JbxNgwagLywkOr/UCnOg@C3sOO/XgXft0NfrQ76PpV4RNs923qz5xuUQu77thSOmO5jufkcU@pPHeYN1b4W9j2KyMfVAa@2LBNMoii6O/1wB//Arvr0r85G4j22Fvf8u7vzu2/@BQ "Python 3 – TIO Nexus") (Header & Footer are Interpreter, code is actual braingolf code, args are inputs)
Outputs `(a+b+9)**(a+b+9)`
From my testing I couldn't find any pairs that this doesn't work on.
[Answer]
# [Python 2](https://docs.python.org/2/), 19 bytes
```
lambda x,y:x+9<<y+9
```
[Try it online!](https://tio.run/nexus/python2#@59mm5OYm5SSqFChU2lVoW1pY1OpbfkfyLHNzCsoLdHQ5CooyswrUUjTAIpp/jfUMQIA "Python 2 – TIO Nexus")
I'm pretty sure the bit shift works for all cases, but I'm not 100% on it. Anyway, it saves a few bytes over the exponentiation version.
[Answer]
# [J](http://jsoftware.com/), 5 bytes
Just a translation of [Jelly](https://codegolf.stackexchange.com/a/122445/43319).
```
4 p:+
```
[Try it online!](https://tio.run/##y/r/P83WykShwEr7f2pyRr6CoblCmoKJ2X8A "J – Try It Online")
[Answer]
# [APL (Dyalog)](https://www.dyalog.com/), 4 bytes
Algorithm taken from [here](https://codegolf.stackexchange.com/a/122455/43319).
```
!2++
```
[Try it online!](https://tio.run/##SyzI0U2pTMzJT///P@1R2wRFI23t/06ZJeWZxalAbrXRo66lj3p3gVDPfkNDhUd9U12CHvWuAgooPOrdWsvllZ@ZB1L4qLdP41HvVKC4pg6YBsqFpBaXAOW0dXR1dB/1rtA5PF3n8HYgArFrwISOlo4WiPGoYwXUUp1HnQvgzI7lMCbIGjABVM3lnJGanA00uM7wUUfXo44ZehppQAbINk2QdEhiUg7Y8RrqCgrqQNdsBTlpK9DV6grqILcDdUD91LsC5ND/YAOB/tlsYcKVpgDWD@KZAwA "APL (Dyalog Unicode) – Try It Online")
`!` factorial of
`2+¨` two plus
`+` the sum
Works in J too.
[Answer]
# [sed](https://www.gnu.org/software/sed/), 6 bytes
```
s/ /1/
```
[Try it online!](https://tio.run/nexus/sed#@1@sr6BvqP//v5GCKQA "sed – TIO Nexus")
Input is via stdin in the form "x y", output is to stdout. 
Port of [this python answer](https://codegolf.stackexchange.com/a/122523), which includes the proof of correctness. Many thanks to [xnor](https://codegolf.stackexchange.com/users/20260/xnor) for such a simple method.
[Answer]
# Java 8, 15 bytes
```
a->b->a*a+b*b+2
```
Port from [*@Arnauld*'s amazing JavaScript (ES6) answer](https://codegolf.stackexchange.com/a/122460/52210).  
[Try it here.](https://tio.run/nexus/java-openjdk#jY09D4IwEEB3fsWNFKTxKzqoHU0cnByNw7WiqSmlgYNIjL8dwQCLA073cvfyTicuzQgeWCIvSBt@K6winVq@72DjKYN5DkfU9uUBuEIarSAnpGaUqb5C0pz8E2Xa3s8XeLJWA@gD24Ol@B5nk59FN4UABbsaIyEjgQGGMpDhvG4bm2/pVOUUJzwtiLvmCRnrK47Omcqfsw4WjI3KUzbAuDxb9/Zy9Ye@YgP80WYDfOW3964/)
Straight-forward approach (**~~177~~ 170 bytes**):
```
a->b->{int r=1;for(;a+b==r|a-b==r|a*b==r|(b>0?a/b==r|a%b==r:0>1)|Math.pow(a,b)==r|(a|b)==r|(a^b)==r|(a&b)==r|new Integer(""+a+b)==r|new Integer(""+b+a)==r;r++);return r;}
```
[Try it here.](https://tio.run/nexus/java-openjdk#fY9RS8MwFIXf/RWXgZIssTZONljpfPZhT3sUhZsaZ6FLy23qELvfXpOle3OF5J7D/Q4JZygqbFvY/t4ANJ2uygJah87Ld11@wAFLy3aOSrt/fUMeUgC7n9aZQ1J3Lmk8cZVlBXuUC86z6zyV6SRXK/m0nEws5TRXUkV@8tefsYfHULAwUYapxxbBU67ig581sQyFznPq8T7K/CxMb9JnfIir2yDrdKN4v0X3lTT1kaHU/BzE/mLeL@YuGmuO8GKd2Rtis5nw//y31gLDOiMhxppkXEcWKJY6DcMf)
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), ~~2~~ 4 bytes
```
+ØDm
```
[Try it online!](https://tio.run/##MzBNTDJM/f9f@/CM///NuMwA "05AB1E – Try It Online")
Same as the Jelly answer, finds a prime after the sum. One byte shorter :)
**EDIT**: Now raises it to its own power to suffice for the exception.
]