Number of pairs of integers satisfying this sum

  • Thread starter Thread starter timetraveller123
  • Start date Start date
  • Tags Tags
    Integers Sum
Click For Summary

Homework Help Overview

The discussion revolves around determining the number of pairs of integers (a, b) such that 1 ≤ b < a < 200, and the expression (a+b) + (a-b) + ab + (a/b) results in a perfect square. Participants explore various interpretations and methods to analyze the problem.

Discussion Character

  • Exploratory, Assumption checking, Problem interpretation

Approaches and Questions Raised

  • Some participants attempt to rewrite the original expression in different forms to analyze its implications, while others question the validity of the transformations made. There are discussions about the conditions under which certain values for b and n are valid, and whether the floor function is being applied correctly in the context of counting pairs.

Discussion Status

The discussion is ongoing, with participants providing insights and corrections to each other's reasoning. Some have identified potential errors in the original solution regarding the application of the floor function and the conditions for b and n. Others are seeking clarification on the implications of the inequalities involved.

Contextual Notes

Participants note that the original problem's constraints, particularly regarding the values of b and n, are critical to understanding the solution. There is also mention of the need to differentiate between strict inequalities and inclusive ones in the context of counting valid pairs.

timetraveller123
Messages
620
Reaction score
45

Homework Statement



determine the number of pairs of integers (a,b) 1≤b<a<200 such that the sum
##
(a+b) + ( a-b) + ab + \frac a b\
##
is the square of an integer

i have the solution to the problem this was the given solution

the given equation is equivalent to
##
\frac {a*(b+1)^2} b\\
##
hence
##
\frac a b = n^2\
##
hence a = bn2 ≤ 200
we must have b≥ 1 and n ≥2 where b and n are integers
thus the number of pairs is given by
##
floor(200/1^2) + floor (200/2^2) ... floor (200/14^2) ## = 112 pairs

this is the given solution i don't quite understand the last part are they using b = 1

i did another method but i am not sure what is wrong someone point the mistake to me thanks it is below

Homework Equations

The Attempt at a Solution


[/B]
the equation can also be written as
##
a( \sqrt b + \frac 1 {\sqrt b})^2 = k^2
##
meaning that a = n2 for some integer n and
##
\sqrt b + \frac 1 {\sqrt b} = l
##
for some integer l defining j = l2
b2 + b (2 - j ) + 1 = 0
taking discriminant it must be more than zero hence
j≤4
hence
l ≤ ±2
only j = 4 gets a real b
hence b = 1 so i got b = 1 is the only value for b is it correct
next
we have 4a = k2
4≤ k2 ≤ 800
the number of squares between the range is definitely not 112 so what am i doing wrong?
 
Last edited:
Physics news on Phys.org
vishnu 73 said:
##a( \sqrt b + \frac 1 {\sqrt b}) = k^2##

##a( \sqrt b + \frac 1 {\sqrt b}) \ne (a+b) + ( a-b) + ab + \frac a b##

For b = 1 and a = 4.
 
i am sorry that is not the correct equation i forgot the square i edited it now
 
vishnu 73 said:
taking discriminant it must be more than zero hence
j≤4

##\Delta = (2-j)^2 - 4 = 4 + j^2 - 4j - 4 = j^2 - 4j ##

But for j < 5, the opposite is true.
 
why do you have to expand it i just did

Δ = (2 - j)2 - 4≥0
2-j ≥ ±2
j cannot be zero
j = 1,2 of which only j = 2 gives a real b
then b = 1
edit:
my method is wrong sorry about that
so using your method
j<0 or j>4
so b≥1
then how do i do we have a = n2

oh wait my method is completely off and only just proved the already given statement that b>0
so my method has been completely wrong

i understand the given solution to the end but what are they doing with the floor function
 
Last edited:
I don't think
##\displaystyle \lfloor 200/1^2 \rfloor + \lfloor 200/2^2\rfloor+ ...+ \lfloor 200/14^2\rfloor##

equals 112 as ##\lfloor 200/1^2 \rfloor ## is 200. I think the given expression is 312.

Edit:-

I see what they did now,

##\displaystyle \lfloor 200/1^2 \rfloor + \lfloor 200/2^2\rfloor+ ...+ \lfloor 200/14^2\rfloor = 312##

but since ##a \ne b##, so they subtracted 200 from it.
 
no i am sorry once again ignore the first term only starts from 22
what exactly are they doing

are they just finding all the possible value of b by using floor(200/n2) where n goes from 2 to 14
but the condition is only that bn2 ≤ 200
then couldn't we also use floor(199/n2) why 200
 
You know ##a = bn^2##, so you need all ##b## that multiplied by some ##n^2## give some ##a## less than ##200##.

Here ##n^2## is constant.

Lets say ##mk = z## where k is some real number, then you know that ##mj = i < z## if ##j < k##.
Now if you want to find all ##(i,j)## such that ##i/j = m## then you just need to count the number of ##j## which is all +ve integers less than ##k##.

If we have ##g(m)## which gives the number of ##(i,j)## for a ##m##. Then we will define ##g## by ##\displaystyle g(m) = \begin{cases} \operatorname{floor}(z/m)\qquad \text{if z is not divisible by m} \\ z/m - 1\qquad \text{else} \end{cases}##.

If you take ##m = n^2## from ##2## to ##14##, ##j = b##, ##a= i## and ##z= 200## and apply the above logic you will get your answer.

On a side note, If I understand correctly then the given answer is a bit wrong since for ##n = 2##, floor(200/4) = 50, but for ##b = 50##, ##a= 200## which is not possible, so ##49## is correct number of pairs for ##n = 2## not ##50##.
 
Last edited:
  • Like
Likes   Reactions: timetraveller123
vishnu 73 said:
no i am sorry once again ignore the first term only starts from 22
what exactly are they doing

are they just finding all the possible value of b by using floor(200/n2) where n goes from 2 to 14
but the condition is only that bn2 ≤ 200
then couldn't we also use floor(199/n2) why 200

The condition is ##bn^2 < 200## not ##bn^2 \le 200##, since ##a< 200## not ## a \le 200##.

Look at the first sentence of your question.
 
  • Like
Likes   Reactions: timetraveller123
  • #10
ya i agree there is something wrong with the solution you are right but now i am still trying to understand your solution now thanks for it
 
  • #11
vishnu 73 said:
ya i agree there is something wrong with the solution you are right but now i am still trying to understand your solution now thanks for it

If you don't understand then you can ask me.
 
  • Like
Likes   Reactions: timetraveller123
  • #12
ya so this is my question thanks for being patient with me really appreciate it
so for n = 3 we had
floor(200/9) giving b =22 but why couldn't b have been 21
because 21 * 9 = 189 = a < 200 why not
?
it is the inequality that is giving me all the trouble
 
  • #13
vishnu 73 said:

Homework Statement



determine the number of pairs of integers (a,b) 1≤b<a<200 such that the sum
##(a+b) + ( a-b) + ab + \frac a b## is the square of an integer

i have the solution to the problem this was the given solution

the given equation is equivalent to
##\frac {a*(b+1)^2} b##
Neither of these is an equation (no = sign) -- they are expressions. If two expressions have the same value, they are equal, not equivalent.
 
  • Like
Likes   Reactions: SammyS
  • #14
vishnu 73 said:
ya so this is my question thanks for being patient with me really appreciate it
so for n = 3 we had
floor(200/9) giving b =22 but why couldn't b have been 21
because 21 * 9 = 189 = a < 200 why not
?
it is the inequality that is giving me all the trouble

Yes it can be. It can be ##20, 19 ,... ##.

I never said ##b## can be less than the "floor value" rather than it can be all values less than the "floor value". We are not interested in the value rather than the number of values for ##b##. The number of b's is equal to "floor value" if ##200/n^2## is not a whole number.
 
Last edited:
  • Like
Likes   Reactions: timetraveller123
  • #15
omg it all makes sense now when you said the floor gives the number of b rather than b itself thanks a lot couldn't express how much it helped thanks once again a lot good luck with your career !
 
  • Like
Likes   Reactions: Buffu
  • #16
vishnu 73 said:

Homework Statement



determine the number of pairs of integers (a,b) 1≤b<a<200 such that the sum
##
(a+b) + ( a-b) + ab + \frac a b\
##
is the square of an integer

i have the solution to the problem this was the given solution

the given equation is equivalent to
##
\frac {a*(b+1)^2} b\\
##
hence
##
\frac a b = n^2\
##
hence a = bn2 ≤ 200
we must have b≥ 1 and n ≥2 where b and n are integers
thus the number of pairs is given by
##
floor(200/1^2) + floor (200/2^2) ... floor (200/14^2) ## = 112 pairs

this is the given solution i don't quite understand the last part are they using b = 1

i did another method but i am not sure what is wrong someone point the mistake to me thanks it is below

Homework Equations

The Attempt at a Solution


[/B]
the equation can also be written as
##
a( \sqrt b + \frac 1 {\sqrt b})^2 = k^2
##
meaning that a = n2 for some integer n and
##
\sqrt b + \frac 1 {\sqrt b} = l
##
for some integer l defining j = l2
b2 + b (2 - j ) + 1 = 0
taking discriminant it must be more than zero hence
j≤4
hence
l ≤ ±2
only j = 4 gets a real b
hence b = 1 so i got b = 1 is the only value for b is it correct
next
we have 4a = k2
4≤ k2 ≤ 800
the number of squares between the range is definitely not 112 so what am i doing wrong?

Using ##b = a/n^2## we have
$$
(a+b) + ( a-b) + ab + \frac{a}{b} = \left(n + \frac{a}{n} \right)^2,
$$
so ##n + a/n ## must be an integer. Thus, ##a## must be a multiple of ##n##. We can easily enough enumerate and count the possibilities for ##n=1##, ##n=2##, ##n=3, \ldots , n = 199##.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 12 ·
Replies
12
Views
4K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 21 ·
Replies
21
Views
2K
  • · Replies 20 ·
Replies
20
Views
3K
  • · Replies 14 ·
Replies
14
Views
3K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 4 ·
Replies
4
Views
4K