how many solution of n (integer positive) so that n^2 + (n+1)^2 be a perfect square, with n < 200
@rational
i just remember the triplet of pythagoras which is consecutive number : (3,4,5), (20,21,29). any else ?
and i need a way to get n
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
we want to choose integer k so that n is also an integer
we need 2k^2-1 to be a perfect square
also 2k^2-1 is odd
so we know for some odd integer m we have m^2=2k^2-1 right?
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\]
you mean n = a^2 - b^2, (n+1) = 2ab, and (a^2 + b^2) right ?
i am choosing "n" to be even it doesn't matter
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 ?
Fine that works too
I feel like I hit a brick wall with my thingy up above
this is a hard problem haha
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
ok, thanks @freckles . so far i got k = 1 or k = 5
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
so far i got n = 3,20,19
but not sure if any else for solution of n
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
i mean in order n = 2ab and (n+1) = a^2 - b^2
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 ?
let me try this :)
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)
ah, yes b = 2 is work
so, (a,b) = (5,2) get n = 2ab = 2(5)(2) = 20
so, only 3 solutions satisfied for n = 3,20,119 case closed :)
wolfram is make sure to me :) thanks a lot @rational
I did them all through brute force; yes, there are only 3 solutions.
i dont know what's brute force method but thanks to make sure too :)
there is a nice way to work this if you know infinite continued fractions of irrational numbers
\(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\]
Brute force is starting at 1 and doing every one until you hit 200.
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)} }}}\]
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
Join our real-time social learning platform and learn together with your friends!