POTW Integer n: Solving the Equation ##\dfrac{n^2+3}{2n+4}## for Integers

  • Thread starter Thread starter anemone
  • Start date Start date
  • Tags Tags
    Integers
AI Thread Summary
The discussion focuses on finding integer solutions for the equation (n^2 + 3) / (2n + 4) being an integer. The quadratic form derived from the equation leads to specific integer solutions: n = -9, -3, -1, and 5, with a general solution pattern emerging as n = {-2k-7, -3, -1, 2k+3}. Additionally, the discussion explores an extended problem involving the parameter d, leading to similar quadratic equations and highlighting the importance of factorization for determining integer solutions. The conversation also touches on the graphical representation of the function and its symmetry properties, indicating a deeper exploration of integer solutions as k increases.
anemone
Gold Member
MHB
POTW Director
Messages
3,851
Reaction score
115
Find all integers n such that ##\dfrac{n^2+3}{2n+4}## is an integer as well.
 
  • Like
Likes Greg Bernhardt, bob012345 and topsquark
Physics news on Phys.org
It is obvious that n is odd integer, so say n=2m+1
The given formula becomes
m-\frac{1}{2}-\frac{\frac{7}{4}}{m+\frac{3}{2}}
So the RHS last term is half integer so
p(m)=\frac{\frac{7}{2}}{m+\frac{3}{2}}is an odd integer.
|m+\frac{3}{2}|\leq\frac{7}{2}
-5\leq m \leq 2
Only p(-5)=-1,p(-2)=-7,p(-1)=7,p(2)=1 are odd integers which result
n=-9,-3,-1,5
 
Last edited:
If n^2 + 3 = k(2n+4) then n^2 - 2kn + (3-4k) = 0. The discriminant of that quadratic must be a perfect square, say k^2 + 4k-3 = m^2. Then (k+2)^2 - 7 = m^2. The only squares that differ by 7 are 9 and 16, so k+2 = \pm4. Thus either k = 2 and n^2 - 4n - 5 = 0, giving n = -1 \text{ or }5; or k= -6 and n^2 + 12n + 27 = 0, giving n = -3 \text{ or }-9.
 
Last edited:
  • Like
  • Love
Likes DaveE, bob012345, Greg Bernhardt and 4 others
Graphically, the relation looks like the following graph if one extends it to the continuous regime. Interestingly, the integer n values are equally spaced on either side of the pole at x=−2 as −2±1 and −2±7.

desmos-graph (32).png
 
Last edited:
I also noticed that the lines ##y=x±3## intersect the curve ##\dfrac{x^2+3}{2x+4}## exactly at the integer solution points -9,-3,-1 and 5.

desmos-graph (1).png


If we let ##\dfrac{n^2+3}{2n+4} = n±3 ## we get the four integer solutions quickly because the solutions are the intercepts of the lines with the original function. This can be generalized as;

$$\dfrac{n^2+2k+1}{2n+4} = n±(k+2) \quad k=0,1,2,3...$$
The solutions are $$n=\{-2k-7, -3,-1, 2k+3\}$$ and the original case is recovered with ##k=1##.

EDIT: for very large values of ##k## this method does not get all the cases.
 
Last edited:
bob012345 said:
Graphically, the relation looks like the following graph if one extends it to the continuous regime. Interestingly, the integer n values are equally spaced on either side of the pole at x=−2 as −2±1 and −2±7.
y=\frac{x^2+3}{2x+4}=\frac{1}{2}(x+2+\frac{7}{x+2})-2
So we see the graph is untisymmetric to the line ##y=-2## and ##x=-2##
 
(cont.)
say z=x+2
z+\frac{7}{z}=2n even number.
z^2-2nz+7=0 should be
(z-1)(z-7)=0 or
(z+1)(z+7)=0
 
I leave it so someone else to solve the even cases; $$\dfrac{n^2+2k }{2n+4} \quad k= 1,2,3...$$
 
bob012345 said:
I leave it so someone else to solve the even cases;
As for the extended problem : Find all integers n such that ##\frac{n^2+d}{2n+4}## with integer d, is an integer as well, we should get quadratic equation similar to #7
z^2-2mz+d+4=0
If d+4 is prime number we would get answers similarly.
If d+4 is square number we would get z is ##\pm## square root of it.
More in general if we can factorize
d+4=MN
where M and N are both odd or even, that provides the answer.
As for your interest of even d, it is any multiple of 4 so that both M and N are even.
 
Last edited:
  • #10
anuttarasammyak said:
As for the extended problem : Find all integers n such that ##\frac{n^2+d}{2n+4}## with integer d, is an integer as well, we should get quadratic equation similar to #7
z^2-2mz+d+4=0
If d+4 is prime number we would get answers similarly.
If d+4 is square number we would get z is ##\pm## square root of it.
More in general if we can factorize
d+4=MN
where M and N are both odd or even, that provides the answer.
As for your interest of even d, it is any multiple of 4 so that both M and N are even.
Please clarify your process in #7. Where does the ##2n## come from?

$$z+\frac{7}{z}=2n$$

Also, for ##d+4=MN##, if d is even, don't both M and N have to be even?
 
  • #11
bob012345 said:
Please clarify your process in #7. Where does the 2n come from?
In the formula of #6 due to the coefficient ##\frac{1}{2}##, ##z+\frac{7}{z}## is an even number so that y is an integer.
bob012345 said:
Also, for d+4=MN, if d is even, don't both M and N have to be even?
M,N are solutions of the quadratic equation of z. M+N =2m is even, i.e. they are both odd or even.
 
  • #12
I agree the even cases only work for multiples of 4;

$$f(n)=\dfrac{n^2+4k }{2n+4} \quad k= 1,2,3...$$ where;

$$n=\{-2(k+2), -4,0, 2k\}$$ and the values of the relation are;

$$ f(n)=\{-4-k,k\}$$

EDIT: Again, for large values of ##k## this does not get all possible cases. See post #13 by @anuttarasammyak.
 
Last edited:
  • #13
I think there are more cases than you show
e.g.
k+1=\frac{M}{2}\frac{N}{2}
for k=119 (M/2,N/2)={(1,120),(2,60),(3,40),(4,30),(5,24),(6,20),(8,15),(10,12)} for M<N
 
Last edited:
  • #14
anuttarasammyak said:
I think there are more cases than you show
e.g.
k+1=\frac{M}{2}\frac{N}{2}
for k=119 (M/2,N/2)={(1,120),(2,60),(3,40),(4,30),(5,24),(6,20),(8,15),(10,12)} for M<N
Well, I did miss some! According to Wolfram Alpha, there are 32 integer solutions for k=119.

https://www.wolframalpha.com/input?i=+++(x^2++476)/(2x+4)+=+m+

I'm not sure what you mean by

$$k+1=\frac{M}{2}\frac{N}{2}$$ or how it works to generate solutions to the original problem. For example, for k=119, what is (1,120)? How is it a solution to the original problem?

Did you meant solutions to this?

$$ \dfrac{n^2+4*119 }{2n+4} $$
 
Last edited:
  • Like
Likes anuttarasammyak
  • #15
bob012345 said:
Well, I did miss some! According to Wolfram Alpha, there are 32 integer solutions for k=119.

https://www.wolframalpha.com/input?i=+++(x^2++476)/(2x+4)+=+m+
bob012345 said:
Did you meant solutions to this?
Yes. 32 solutions correspond with 16 solutions in post #13 doubled by putting minus sign.

bob012345 said:
For example, for k=119, what is (1,120)?
z=x+2=2, 240
x=0, 238
They are in your wolfram solution list. Explicitly
n=\pm 2q -2where q is a devisor of k+1
k+1 \equiv 0(mod\ q)
 
Last edited:
Back
Top