Ask your own question, for FREE!
Mathematics 18 Online
OpenStudy (anonymous):

how many solution of n (integer positive) so that n^2 + (n+1)^2 be a perfect square, with n < 200

OpenStudy (anonymous):

@rational

OpenStudy (anonymous):

i just remember the triplet of pythagoras which is consecutive number : (3,4,5), (20,21,29). any else ?

OpenStudy (anonymous):

and i need a way to get n

OpenStudy (freckles):

hmmm I'm only going to think here \[n^2+(n+1)^2=k^2 \\ n^2+n^2+2n+1=k^2 \\ 2n^2+2n+1-k^2 =0 \\ n=\frac{ -2 \pm \sqrt{4-4(2)(1-k^2)}}{2(2)} \\ n=\frac{-2 \pm \sqrt{4} \sqrt{1-2(1-k^2)}}{4} \\ n=\frac{-1 \pm \sqrt{1-2+2k^2}}{2} \\ n=\frac{-1 \pm \sqrt{2k^2-1}}{2}\] so far I don't know if this helps right now this is just the first thing I thought of

OpenStudy (freckles):

we want to choose integer k so that n is also an integer

OpenStudy (freckles):

we need 2k^2-1 to be a perfect square

OpenStudy (freckles):

also 2k^2-1 is odd

OpenStudy (freckles):

so we know for some odd integer m we have m^2=2k^2-1 right?

OpenStudy (rational):

im thinking of first generating all pythagorean triples \((a,b,c)\) satisfying given conditions with even \(n\) : \[a=n = 2xy\\b=n+1 = x^2-y^2 = 2xy+1\\c=x^2+y^2\]

OpenStudy (anonymous):

you mean n = a^2 - b^2, (n+1) = 2ab, and (a^2 + b^2) right ?

OpenStudy (rational):

i am choosing "n" to be even it doesn't matter

OpenStudy (anonymous):

if n = a^2 - b^2 n + 1 = 2ab -------------- (-) -1 = a^2 - 2ab - b^2 a^2 - 2ab - b^2 + 1 = 0 a^2 + b^2 - 2ab - 2b^2 + 1 = 0 (a - b)^2 = 2b^2 - 1 a - b = +- sqrt (2b^2 - 1) a = b +- sqrt(2b^2 - 1) hmmm, what's next ?

OpenStudy (rational):

Fine that works too

OpenStudy (freckles):

I feel like I hit a brick wall with my thingy up above

OpenStudy (rational):

this is a hard problem haha

OpenStudy (freckles):

I mean I can choose integer k so 2k^2-1 is an odd perfect square and hopefully the numerator I had is divisible by 2 but that sounds like a lot of numbers to plugin between 1 and 200

OpenStudy (anonymous):

ok, thanks @freckles . so far i got k = 1 or k = 5

OpenStudy (anonymous):

i want to conecting it with my job above : a = b +- sqrt(2b^2 - 1) for b = 2 than a = 1 + 1 = 2, so (a,b) = (2,1) give us n = 2^2 - 1^2 = 3 for b = 5 than a = 5 + 7 = 12, so (a,b) = (5,12) get n = 119

OpenStudy (anonymous):

so far i got n = 3,20,19

OpenStudy (anonymous):

but not sure if any else for solution of n

OpenStudy (anonymous):

can i replace the general of triples : a^2 - b^2 , 2ab, a^2 + b^2 be 2ab, a^2 - b^2, a^2 + b^2 ? @rational

OpenStudy (anonymous):

i mean in order n = 2ab and (n+1) = a^2 - b^2

OpenStudy (anonymous):

and obvious a^2 + b^2 is always be the longest side (hypotenus), so i just can play in order 2ab and a^2 - b^2 only, right ?

OpenStudy (anonymous):

let me try this :)

OpenStudy (anonymous):

n = 2ab n + 1 = a^2 - b^2 ----------------- (-) -1 = 2ab - a^2 + b^2 a^2 - 2ab - b^2 = 1 a^2 - 2ab + b^2 = 2b^2 + 1 (a - b)^2 = 2b^2 + 1 a = b +- sqrt(2b^2 + 1) a = b +- sqrt(2b^2 + 1)

OpenStudy (anonymous):

ah, yes b = 2 is work

OpenStudy (anonymous):

so, (a,b) = (5,2) get n = 2ab = 2(5)(2) = 20

OpenStudy (anonymous):

so, only 3 solutions satisfied for n = 3,20,119 case closed :)

OpenStudy (anonymous):

wolfram is make sure to me :) thanks a lot @rational

OpenStudy (doc.brown):

I did them all through brute force; yes, there are only 3 solutions.

OpenStudy (anonymous):

i dont know what's brute force method but thanks to make sure too :)

OpenStudy (rational):

there is a nice way to work this if you know infinite continued fractions of irrational numbers

OpenStudy (rational):

\(n^2+(n+1)^2=k^2 \\ 2n^2+2n+1=k^2\\4n^2+4n+2 = 2k^2\\(2n+1)^2-2k^2 = -1\) This is pell's equation, let \(2n+1=x\) : \[x^2-2k^2=-1\]

OpenStudy (doc.brown):

Brute force is starting at 1 and doing every one until you hit 200.

OpenStudy (rational):

All the solutions to above equation are given by \(\large (p_{2i}, ~q_{2i})\) where \(\dfrac{p_{i}}{q_i}\) is the \(i\)th sum of continued continued fraction of \(\sqrt{2}\) : \[\dfrac{p_i}{q_i} = 1+\dfrac{1}{2+\dfrac{1}{2+\dfrac{1}{2+\cdots \text{(i times)} }}}\]

OpenStudy (rational):

the first solution to \(x^2 - 2k^2 = -1\) can be obtained working \(2\)nd sum : \[\dfrac{p_2}{q_2} = 1+\dfrac{1}{2+\dfrac{1}{2}} = \dfrac{7}{5}\] therefore \((7,5)\) is a solution to \(x^2 - 2k^2 = -1\) \(x=2n+1 = 7 \implies n = 3\) similarly working \(\dfrac{p_4}{q_4}\) gives the next solution

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!