- #1

- 84

- 0

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

You are using an out of date browser. It may not display this or other websites correctly.

You should upgrade or use an alternative browser.

You should upgrade or use an alternative browser.

- Thread starter epsi00
- Start date

- #1

- 84

- 0

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

- #2

CompuChip

Science Advisor

Homework Helper

- 4,306

- 48

[tex]a = (6x + 1) n - 5x[/tex]

to get any integer

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

- #3

- 84

- 0

x, you can set

[tex]a = (6x + 1) n - 5x[/tex]

to get any integernyou 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.

- #4

- 695

- 2

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).

- #5

CompuChip

Science Advisor

Homework Helper

- 4,306

- 48

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.

Share: