## Couple questions

Is there a better way to write this:

$$g(x, n) = D(\frac{x}{n})*(n)$$

Where D(h), unless already a decimal, expands h into a sum of its places i.e. 47=40+7, then subtracts all of the terms that are greater than or equal to one.

Also, if I have a function, say $$f(x) = \sqrt{x}$$, and I only wanted the integer values of x that made f(x) an integer, is there a different way of writing this, where I wouldn't have to plug in and check?(this goes for any function, where irrationality is possible or not)

 g(x,n) is the remainder of $$\frac{x}{n}$$, if x and n are integers. For f(x)=$$\sqrt{x}$$, it is possible [x=(f(x))2, f(x)>0; i.e. if f(x) is an integer, then x is an integer]. Another example would be f(x) = loga (x) [a>0 is an integer]; with x=af(x), so if f(x) is an integer, then x is also an integer. But it is not possible for EVERY function, such as ln(x), sin(x), etc. For these, you would need to substitute and find out if they work (if there were an integer that would yield an integer value).

 Quote by ForMyThunder g(x,n) is the remainder of $$\frac{x}{n}$$, if x and n are integers.
Is there any special notation to represent the remainder of integer division?

Is there any special notation (I thought there was here) to represent the remainder of integer division multiplied by the denominator integer?

## Couple questions

 Quote by epkid08 Is there any special notation to represent the remainder of integer division? Is there any special notation (I thought there was here) to represent the remainder of integer division multiplied by the denominator integer?
a mod b
gives the remainder when a is divided by b

 To put it another way, $$a \equiv b (mod m) \Leftrightarrow m|(a-b) \Leftrightarrow a = km + b$$ Thus, a and b have the same remainder upon division by m.

Recognitions:
Homework Help
 Quote by ForMyThunder a mod b gives the remainder when a is divided by b
Yes, and that's sometimes written a%b, just like $a\times b$ is sometimes written a*b.

 Quote by CRGreathouse Yes, and that's sometimes written a%b, just like $a\times b$ is sometimes written a*b.
Isn't the a%b notation usually used in computer programming? I just didn't think they used it much in mathematics.

Recognitions:
Homework Help