0

Find how many integer solutions for $x,y$ does the following equation have? $$10xy + x + 7y = 2298$$

Is there a quick way? I’ve tried with SFFT but the $10xy$ term seems to be a problem when factoring.

Edit: This equation was developed as a quick way to obtain factoring decomposition of numbers ending in $7$. The solutions of the equation $(12,18)$ have the following pattern:

$127*181=22987$

$7$ and $1$ digits are added at the end of each solution, same with the $7$ added at the end of $2298$

Vikter
  • 29
  • 5
  • @DietrichBurde thanks but i was looking for a method that does not require brute force… that seems to be a trial and error methodology – Vikter Jul 25 '22 at 15:29
  • 1
    You're right that the 10xy term is a "problem", in that this nonlinearity makes your question difficult to answer. In particular, I think this is a nonlinear integer programming problem, which is typically NP-hard. Not sure how to go about solving this, I just wanted to chime in and say this isn't an easy problem. – jtb Jul 25 '22 at 15:35
  • 1
    Are negative solutions allowed? – Dan Jul 25 '22 at 15:56
  • What's there in that link is exactly what I did and it was pretty easy. Only that I needed to use prime factors calculator online which showed only 2 factors and hence only 1 solution i.e. $x = 12, y = 18$. – Rishi Jul 25 '22 at 15:58
  • The quickest way that I know is to type this into Maple as isolve({10xy+x+7*y=2298},{x,y}) ; to hit carriage return, and this will respond with {x=12,y=18}, {y=0,x=2298} – R. J. Mathar Jul 25 '22 at 16:09
  • @Rishi , RJ Mathar, do you think this can be replicable to larger numbers? E.g. the integer number at the other side of the equation being a 100-digit number instead of 2298 – Vikter Jul 25 '22 at 16:45
  • 1
    "that seems to be a trial and error methodology" !!! No, certainly not, go read it again. – JBL Jul 25 '22 at 16:57
  • $$ (10x+7)(10y +1) = 100 xy + 10 x + 70 y +7 $$ – Will Jagy Jul 25 '22 at 17:02
  • If you do the arithmetic modulo 10, the $xy$ term drops out and you're left with $x+7y=8$, which has 10 possible solutions. (Select any $y$, then $x = 8-7y$.) Of course, you still need to work out the higher digit places. – Dan Jul 25 '22 at 17:04
  • 4
  • @Vikter it will work as far as you can obtain prime factorization of the relevant number. If we are concerned only with how many solutions does it have there has to be other ways to tell that but I am not aware of one. – Rishi Jul 25 '22 at 18:34
  • @Rishi thanks, maybe I should have specified more. The issue I have with this equation is solving it for integer numbers without knowing prime factorization of that number (using a large number instead of 2298) – Vikter Jul 26 '22 at 10:04
  • 1
    It is not possible to solve questions like this without being able to factor integers -- consider the simplest case $xy + 0x + 0y = N$. – JBL Jul 26 '22 at 16:43
  • @Dan thank you, if after this modulo transformation, you solve this equation, x=1 and y=1 are the first digits of the solutions 12,18. Is that the relationship? Can you clarify a bit more how did you reduce the equation? – Vikter Jul 26 '22 at 22:24

1 Answers1

0

One way is to use the fraction first, then remove the denominator.

$10xy+x+7y=2298$

$x(10y+1)+7y=2298$ , then create $(10y+1)$ for $7y$

$x(10y+1)+\frac{7}{10}(10y+1) - \frac{7}{10}=2298$

$(x + \frac{7}{10})(10y+1) = 2298+\frac{7}{10}$

now, remove the denominator $10$, by multiply 10 both sides.

$10(x + \frac{7}{10})(10y+1) = 10(2298+\frac{7}{10})$

$(10x + 7)(10 y + 1) = 22987 = 127\cdot 181 = 1 \cdot 22987$

so it means

\begin{equation} \left\{ \begin{aligned} 10x+7&=127\\ 10y+1&=181\\ \end{aligned} \right. \end{equation}

or

\begin{equation} \left\{ \begin{aligned} 10x+7&=22987\\ 10y+1&=1\\ \end{aligned} \right. \end{equation}


The answer is

$(x,y) = (12,18) , (2298,0)$

YeXiaoRain
  • 136
  • 5
  • Thank you. My issue here is if you can do this method when the number you need to factorize (22987) is so large you cannot find primes. If you have this restriction (ex. We use a 100-digit number instead of 2298 in original equation) would you still be able to obtain x,y integer values? When you decompose 22987 into 127*181, this is the tricky part – Vikter Jul 26 '22 at 10:01
  • I think this is about prime number factorization. For large numbers it is usually computed by computer rather than by hand. In computer methods, you can first test prime numbers using AKS, Miller-rabin or other algorithm. Then try to factor from $1$ to $\sqrt{n}$, or use the Pollard-Rho algorithm. For numbers that are not very large ($n < 3,317,044,064,679,887,385,961,981$), Miller-rabin can be test it with some pre-defined prime numbers. – YeXiaoRain Jul 26 '22 at 21:14
  • And if the number is as large as 100-digits, I'think this will be helpful quora:How-would-you-try-to-factorise-a-more-than-100-digit-number-in-prime-factors. But if it's even larger somthing like 1000-digits or more, maybe there is not simple way. The security of RSA relies on the practical difficulty of factoring the product of two large prime numbers – YeXiaoRain Jul 26 '22 at 21:22