Answer :
If [tex]k[/tex] is odd, then
[tex]\displaystyle\sum_{n=1}^{\lfloor k/2\rfloor}2n=2\dfrac{\left\lfloor\frac k2\right\rfloor\left(\left\lfloor\frac k2\right\rfloor+1\right)}2=\left\lfloor\dfrac k2\right\rfloor^2+\left\lfloor\dfrac k2\right\rfloor[/tex]
while if [tex]k[/tex] is even, then the sum would be
[tex]\displaystyle\sum_{n=1}^{k/2}2n=2\dfrac{\frac k2\left(\frac k2+1\right)}2=\dfrac{k^2+2k}4[/tex]
The latter case is easier to solve:
[tex]\dfrac{k^2+2k}4=2k\implies k^2-6k=k(k-6)=0[/tex]
which means [tex]k=6[/tex].
In the odd case, instead of considering the above equation we can consider the partial sums. If [tex]k[/tex] is odd, then the sum of the even integers between 1 and [tex]k[/tex] would be
[tex]S=2+4+6+\cdots+(k-5)+(k-3)+(k-1)[/tex]
Now consider the partial sum up to the second-to-last term,
[tex]S^*=2+4+6+\cdots+(k-5)+(k-3)[/tex]
Subtracting this from the previous partial sum, we have
[tex]S-S^*=k-1[/tex]
We're given that the sums must add to [tex]2k[/tex], which means
[tex]S=2k[/tex]
[tex]S^*=2(k-2)[/tex]
But taking the differences now yields
[tex]S-S^*=2k-2(k-2)=4[/tex]
and there is only one [tex]k[/tex] for which [tex]k-1=4[/tex]; namely, [tex]k=5[/tex]. However, the sum of the even integers between 1 and 5 is [tex]2+4=6[/tex], whereas [tex]2k=10\neq6[/tex]. So there are no solutions to this over the odd integers.
[tex]\displaystyle\sum_{n=1}^{\lfloor k/2\rfloor}2n=2\dfrac{\left\lfloor\frac k2\right\rfloor\left(\left\lfloor\frac k2\right\rfloor+1\right)}2=\left\lfloor\dfrac k2\right\rfloor^2+\left\lfloor\dfrac k2\right\rfloor[/tex]
while if [tex]k[/tex] is even, then the sum would be
[tex]\displaystyle\sum_{n=1}^{k/2}2n=2\dfrac{\frac k2\left(\frac k2+1\right)}2=\dfrac{k^2+2k}4[/tex]
The latter case is easier to solve:
[tex]\dfrac{k^2+2k}4=2k\implies k^2-6k=k(k-6)=0[/tex]
which means [tex]k=6[/tex].
In the odd case, instead of considering the above equation we can consider the partial sums. If [tex]k[/tex] is odd, then the sum of the even integers between 1 and [tex]k[/tex] would be
[tex]S=2+4+6+\cdots+(k-5)+(k-3)+(k-1)[/tex]
Now consider the partial sum up to the second-to-last term,
[tex]S^*=2+4+6+\cdots+(k-5)+(k-3)[/tex]
Subtracting this from the previous partial sum, we have
[tex]S-S^*=k-1[/tex]
We're given that the sums must add to [tex]2k[/tex], which means
[tex]S=2k[/tex]
[tex]S^*=2(k-2)[/tex]
But taking the differences now yields
[tex]S-S^*=2k-2(k-2)=4[/tex]
and there is only one [tex]k[/tex] for which [tex]k-1=4[/tex]; namely, [tex]k=5[/tex]. However, the sum of the even integers between 1 and 5 is [tex]2+4=6[/tex], whereas [tex]2k=10\neq6[/tex]. So there are no solutions to this over the odd integers.