2

What is the name of the function $f$, defined below?

$$f(n) = m - n\bmod m$$

or

$$n\bmod m + f(n) = m $$

If I were to make up a name, I would probably choose "complement modulus," and maybe $\mathrm{dom}$ or $\overline\bmod$ ("$\bmod$" with an overbar) for an abbreviation.

For example, the "$\bmod 4$" of the first eight natural numbers would be $(1, 2, 3, 0, 1, 2, 3, 0)$; while the "$\mathrm{dom}\ 4$" of the same would be $(3, 2, 1, 4, 3, 2, 1, 4)$.

2 Answers2

3

What you are describing is simply the additive inverse of $n$ modulo $m$, where the residue representatives are $\{1,2,...,m\}$ rather than the more common $\{0,1,...,m-1\}$.

J. W. Tanner
  • 63,683
  • 4
  • 43
  • 88
0

I don't know a name for it, but $f(n)=m\lfloor\frac{n}{m}\rfloor$. Your unlikely to get anything better than @conditionalmethod's suggestion, just as $x\mapsto2\exp\frac{x}{2}$ is unnamed.

Edit: now we've clarified $m-n+m\lfloor\frac{n}{m}\rfloor$ was meant, I don't think that has a specific name either, but I like what you suggested for it.

J.G.
  • 118,053