Find all Number Relations
JavaScript (ES6), 134 bytes
(a,b)=&gt;eval(&quot;for(t=a+b,i=0;i=i&lt;t;)for(++t;t%++i;);for(q=n='';n++&lt;t;)[...'+-*/%^&amp;|&gt;'].every(o=&gt;n^eval(a+(p=o)+b)&amp;&amp;n^eval(b+o+a)),q+=p&quot;)

Using the standard symbols for operations in JavaScript, except for unrelated that is &gt;
Less golfed
(a,b)=&gt;
{
  // find the smallest prime greater than the sum of a and b
  for (t = a + b, i = 0; i &lt; t; )
    for(i=1, ++t; t % ++i; );

  // loop from 1 to t
  // accumulate output in q
  for(q='', n = 0; n++ &lt; t; )
  {
    // try all binary operators
    // to avoid error in 'eval', I need a binary operator for 'unrelated', so I choose '&gt;'
    [...'+-*/%^&amp;|&gt;'].every( // every terminates early if the result is false
      o =&gt; (
        p = o,
        n ^ eval(a+o+b) &amp;&amp; n ^ eval(b+o+a)
      )
      // using xor to check for equality, the result is cast to integer
      // eventually flooring the division result
    )
    q += p
  }
  return q
}

Test


F=
(a,b)=&gt;eval("for(t=a+b,i=0;i=i&lt;t;)for(++t;t%++i;);for(q=n='';n++&lt;t;)[...'+-*/%^&amp;|&gt;'].every(o=&gt;n^eval(a+(p=o)+b)&amp;&amp;n^eval(b+o+a)),q+=p")

console.log(2,3,F(2,3))
console.log(1,1,F(1,1))
console.log(6,6,F(6,6))
console.log(6,12,F(6,12))
console.log(7,15,F(7,15))