Is it allowed to use the modulo operation in math? In computer programming, I use the mod operation to get the remainder from division, which can be used for many things, such as to check whether a number is even or odd. Is it allowed to use the mod operation in mathematics, or is it only in programming? If so, what is the proper way to write it (do I write something like 3 mod 2 or 3 % 2)? If not, is there a mathematical formula that will get the remainder from division?
 A: The notation is  $$a\equiv b \pmod c $$ which stands for $c$ divides $a-b$
For example $$27\equiv 2\pmod 5$$
It is a mathematical tool which is helpful in solving number theory problems.
For example you may  use $ \pmod 5 $ arithmetics to show that every fifth term in the Fibbonaci's sequence,$$1,1,2,3,5,8,13,21,34,55,... $$ is divisble by $5$
The sequence in $\pmod 5$ turns out to be $$1,1,2,3,0,3,3,1,4,0,4,4,3,2,0,2,2,4,1,0,1,1,....$$
We are done!
A: I have seen $a\mathbin{\%} b$ in a math textbook to mean the remainder after dividing $a$ by $b$.  Knuth in his mathematically heavy tome The Art of Computer Programming went for $a\mathbin{\text{mod}} b$ instead.  Generally speaking, so long as you define your notation, you can use whatever notation you want.
For example, the first book specifically defined the remainder to satisfy $0\leq a\mathbin{\%}b <\lvert b\rvert$.  There are a number of conventions for the remainder, and this is the "round the quotient toward negative infinity" convention.
In many programming languages, like C, they use a different convention for $\%$.  The above convention is what Python uses, however.  Other languages, like Haskell, have both mod and rem to be able to use the above convention and the C convention.
A: It is a mathematical concept originally. You write $$a \equiv b \pmod c$$, here $b$ is the residue. This is related to Euclid's algorithm.
A: You get the remainder of a division when you write $a \bmod {b} = c$. Here, we use the MathJax command \bmod (meaning binary mod, which simply means taking the remainder. I at first knew nothing about it till a colleague here told me of it while editing an article. When showing congruences (i.e., showing the equivalence in the remainder obtained on dividing two numbers by the same divisor) we use \equiv ( which yields $\equiv$ symbol). An exemplar usage : $3 \equiv 8 \pmod{5}$ (I typed  $3 \equiv 8 \pmod{5}$ which automatically yields the $\mod 5$ part in parenthesis). This basically refers to the fact that both numbers belong to the same residue class, which is $\lbrace 3,8,13,\dots\rbrace$ in this case if we take only the positive integers.
