title: What does the notation a (mod b, n) mean?
body: <p>I'm trying to write a Python program for the <a href="https://en.wikipedia.org/wiki/AKS_primality_test" rel="nofollow noreferrer">AKS primality test</a>.</p>
  
  <p>The 5th step states <code>if (X+a)^n≠ X^n+a (mod X^r − 1,n), output composite;</code> but I'm not sure what to do when the modulo has 2 arguments: <code>Xr-1</code> and <code>n</code>. In this case, what is it supposed to be calculating?</p>
  
  <p>I understand <code>a(mod b)</code> means that the remainder after dividing a number with <code>b = a</code>, but not sure what the 2 arguments in this are meant to mean.</p>