Physics Forums

Physics Forums (http://www.physicsforums.com/index.php)
-   Linear & Abstract Algebra (http://www.physicsforums.com/forumdisplay.php?f=75)
-   -   Integer values of this expression (http://www.physicsforums.com/showthread.php?t=544231)

epsi00 Oct26-11 08:25 AM

Integer values of this expression
 
Is there a simple way to find the integer values of f(x)=(a+5x)/(6x+1) with a, x integers.

CompuChip Oct26-11 09:04 AM

Re: Integer values of this expression
 
If you pick any integer for x, you can set
[tex]a = (6x + 1) n - 5x[/tex]
to get any integer n you like.

Is that what you meant by "finding the integer values"?

epsi00 Oct26-11 09:28 AM

Re: Integer values of this expression
 
Quote:

Quote by CompuChip (Post 3581349)
If you pick any integer for x, you can set
[tex]a = (6x + 1) n - 5x[/tex]
to get any integer n you like.

Is that what you meant by "finding the integer values"?

In fact, it's exactly the opposite I want. a is a given integer and I am looking for the value(s) of x that make f(x) take integer values. It's simple enough for small values of a but for large values, I cannot afford to check the values of x one by one.

dodo Oct26-11 02:31 PM

Re: Integer values of this expression
 
One thing that may help, other than the obvious observation that x=0 and x=a-1 are always solutions, is that solutions (like these trivial two) come in pairs: that is, if [itex]x_0[/itex] is a solution, producing an integer [itex]n_0 = \frac {5x_0 + a} {6x_0 + 1} [/itex], then it's not hard to prove that [itex]x_1=n_0 - 1[/itex] is a solution too (which will produce the integer [itex]n_1=x_0+1[/itex]).

At least this cuts the search up to something on the order of the sqrt(a): now you need to iterate, from k=1 to a maximum of k=[itex]\lfloor \frac {2 + \sqrt{4+6a}} 6 \rfloor[/itex], checking if [itex]a \equiv k+1 \pmod {6k+1}[/itex], in which case both x=k and x=[itex]\left( \frac {5k+a} {6k+1} - 1 \right)[/itex] are two new solutions (or one, if these two "dual" solutions happen to be the same).

CompuChip Oct27-11 01:09 AM

Re: Integer values of this expression
 
OK, then just reverse my argument:
If n = (a + 5x) / (6x + 1), then you can solve x from this equation. That should give you something like x = (n - a) / (5 - 6n).
This will give integer values for x when (n - a) is a multiple of (5 - 6n), from which you will get the allowed values of a that will give you f(x) = n for your favorite integer n.


All times are GMT -5. The time now is 02:03 PM.

Powered by vBulletin Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2014 Physics Forums