# Given a function $f(x)$, is there an analytic way to determine which integer values of $x$ give an integer value of $f(x)$?

Basically, I have some function $f(x)$ and I would like to figure out which integer values of $x$ make it such that $f(x)$ is also an integer. I know that I could use brute force and try all integer values of $x$ in the domain, but I want to analyze functions with large (possibly infinite) domains so I would like an analytical way to determine the values of $x$.

The function itself will always be well-behaved and inversely proportional to the variable. The domain will be restricted to the positive real axis.

I thought about functions like the Dirac delta function but that only seemed to push the issue one step further back. I get the feeling that I am either going to be told that there is no way to easily determine this, or that I am misunderstanding something fundamental about functions, but I thought I'd let you all get a crack at it at least.

-
Although I am far from being an authority on the case, my intuition says that without further constraints on $f$ this is somewhat impossible, and I would be indeed very surprised to see a positive answer. If you have any other constraints on the function, I would suggest you add them to perhaps allow some latitude in which a positive answer can sneak onto the function. – Asaf Karagila Sep 20 '11 at 23:06
I don't think there's any general method for your problem. Isn't there anything special about $f$? – J. M. Sep 20 '11 at 23:29
@Asaf: Sure, the function itself will always be well behaved and a simple inverse relation to the variable (i.e. $f(x) \propto \frac{1}{x}$), and the domain will always be positive and real. – AdamRedwine Sep 21 '11 at 1:32

It's not just "some function", if it's inversely proportional to the variable $x$ that means $f(x) = c/x$ for some constant $c$. If there is any $x$ such that $x$ and $c/x$ are integers, that means $c = x c/x$ is an integer. The integer values of $x$ for which $c/x$ is an integer are then the factors of $c$. If the prime factorization of $c$ is $p_1^{n_1} \ldots p_m^{n_m}$ (where $p_i$ are primes and $n_i$ positive integers), then the factors of $c$ are $p_1^{k_1} \ldots p_m^{k_m}$ where $k_i$ are integers with $0 \le k_i \le n_i$ for each $i$.