Is there a better way to write this:(adsbygoogle = window.adsbygoogle || []).push({});

[tex]g(x, n) = D(\frac{x}{n})*(n)[/tex]

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 [tex]f(x) = \sqrt{x}[/tex], 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)

**Physics Forums | Science Articles, Homework Help, Discussion**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Couple questions

**Physics Forums | Science Articles, Homework Help, Discussion**