Another problem. Let's go!
Alright, so I think freely when I type - so I'll try to solve this myself. I was able to solve the previous one so I'm hoping that I can do this one just as well.
\[(x+1)^p (x-3)^q = x^n + a_1 x^{n-1} + a_2 x^{n-2}+ \cdots + a_n\]Obviously, \(n = p+q\). We have to find the number of ordered pairs such that \(a_1=a_2\).
\[1\le p, q \le 1000\]I'll try to think of this in terms of Vieta's Formulas.
So now, here, we have roots \(-1\) and \(3\) with multiplicities \(p\) and \(q\) respectively. Therefore,\[a_1 = - (-1\cdot p + 3 \cdot q) = p - 3q\]This one was simple. Now let's try to find out \(a_2\), which is the sum taken two at a time.
Calling @ganeshie8 because I'm feeling quite lonely here.
\[a_2 = -3\binom{n}{2}\] ?
Really? Let's see.\[\underbrace{-1, \cdots, -1}_{ p~times}, \underbrace{3, \cdots, 3}_{q ~ times}\]In all, there are \(\binom{n}2\) pairs. Out of those, \(\binom{p}2\) pairs contribute 1 each and \(\binom{q}2\) pairs contribute 9 each. The rest contribute -3 each.
Ahh right, \(p\ne q\)
\[a_2 = \binom{p}2\cdot 1 + \binom{q}2\cdot 9 + \left(\binom{p+q}2 - \binom{p}2 - \binom{q}2\right)\cdot (-3) \]
\[= p - 3q\]
\[a_2 = \frac{p(p-1) + 9q(q-1)-3\left((p+q)(p+q - 1) - p(p-1) - q(q-1)\right)}{2}\]
What an ugly expression... let's see if we can size it down a bit.
\(p,q ~\in~\mathbb{N}\) is it ?
Yup.
Expanded and got\[5p^2 - 3q^2 - 3 p - 3q + 6pq = 0\]This is some kind of a conic section, ain't it?
\[8p+24q+1 = (2p-6q+1)^2\]
Wow, that looks better. How do we find integral solutions for this?
Like it means that \(8p + 24q + 1\) is a perfect square and there aren't many perfect squares in the range 1-1000, but still there are a lot of them and we can't keep track. You're the number-theory guy here.
wait, do we need to find the ordered pairs (p, q) in the range 1-1000 ?
Yeah.
Oh, so we need to look at perfect squares in the form \(8k + 1\) right?
Well, unfortunately, that means all squares of odd numbers. Haha.
I think so because the left hand side is 8k+1
oh yeah that doesn't help much @mukushla
How did you come up with that form, ganeshie?
Nice question, It's late here guys, I'll come back to this later :) good night!
BTW, I found this one on Brilliant too...
And good night!
It must be\[p^2 -6pq +9q^2 - 3 p - 3q = 0\]
solve for \(q\)\[q=\frac{2p+1 \pm \sqrt{16p+1}}{6}\]
does that mean 16p+1 must be a perfect square
right
Nice! there won't be too many perfect squares of this form is there a nice way to account for divisibility by 6
\[j^2 \equiv 1\pmod{16} \implies j\equiv \pm 1, ~\pm 7 \pmod{16}\]
let \(16p+1=n^2\) which gives\[16p=(m-1)(m+1)\]now \(m\) must be an odd number, say \(2k+1\) \[4p=k(k+1)\]how about \(k\)? \(k\) has the forms of \(4l\) or \(4l+3\) only.
* \(16p+1=m^2\)
does that mean \(p\) has to be an even triangular number ?
I think yes, let's finish this first
\[4p=k(k+1) \implies p =\dfrac{k(k+1)}{2*2}=\dfrac{T_k}{2}\]
aha, counting triangular numbers is easy ha?
we'll work on that too, from mine you get \(p=l(4l+1)\) or \(p=(l+1)(4l+3)\)
that looks a lot better! i see where it is going, we work q also similarly right
we have the quadratic formula, we just need to plug p in terms of l to get q
guys dont want to disteurb this meeting after u are done can u explain this to me from point blank point thanks
\[q=\frac{2p+1 \pm \sqrt{16p+1}}{6} = \dfrac{2p+1\pm (8l+7)}{6}\] ?
right
subing p also \[q=\frac{2p+1 \pm \sqrt{16p+1}}{6} = \dfrac{2(l+1)(4l+3)+1\pm (8l+7)}{6}\]
ok we have some pairs of \(p, q\) in terms of \(l\)\[l(4l+1), \frac{l(4l-3)}{3} \\ l(4l+1), \frac{(l+1)(4l+1)}{3}\]
|dw:1435058536781:dw|
Join our real-time social learning platform and learn together with your friends!