perfect square of summation of odd numbers This is not homework  , and I am old enough to be your father :-).We know the summation of odd numbers results in perfect squares , like $1 + 3 = 4 $, $1+ 3 + 5 = 9$ and so on. 
My  question is , if we start from a random odd number (say $315$) , how many odd numbers after $315$ results in a perfect square ? For what odd number $(2n-1)$ does :-   $315 + 317 + 319 + .....(2n-1) = x^2 $ occur for $ n,x \in \mathbb{N} $ , and $(2n-1)> 315$ ?
 A: We know that the sum up to $2k-1$ is $k^2$, so the sum up to $313$ is $157^2$.  If the highest number in your sum is $2n-1$ we then are asking that $$n^2-157^2=x^2\\(n+x)(n-x)=157^2$$
There will be a solution for each way of factoring $157^2$ into two numbers of the same parity, so both must be odd.  As $157$ is prime, the only factorization of interest is $1,157^2$
$$n+x=157^2\\n-x=1\\n=\frac 12(1+157^2)=12325\\x=12324$$
A: We have:- $ 315+317+...(2n-1)=x^2 \implies n^2 - 157^2 = x^2 \implies x^2 + 157^2 = n^2 $ 
This is a Pythagorean Triple ! 
By setting $157 = k\cdot(p^2 - q^2) = k\cdot(p+q)(p-q) $ , we can obtain our values . However , $157$ is a prime number , and thus , $$p+q=157$$ $$p-q=1$$ $$k=1$$ Thus , $p=79$ and $ q= 78 $ 
Also , $n=k\cdot(p^2+q^2)=79^2+78^2=12325$ , and $x=2kpq=2\cdot 78 \cdot 79 = 12324 $
A: Lets suppose that the random odd number in which we stop is $2k+1$. We known that the sum: 
$$1+3+5+\cdots +(2k+1) = k^2$$
Consider two cases:
Case 1: k is even
If this is the case then que can write $k = 2n$. Follows to see that $k^2 = (2n)^2$ and,
$$(2n)^2+(n^2-1)^2 = (n^2+1)^2$$
We know that:
$$1+3+4+\cdots+(2(n^2+1)+1)$$
Hence is follows that:
$$(n^2+1)^2-(2n)^2 = (2k+3) + (2k+5)+\cdots + (2(n^2+1)+1) = (n^2-1)^2$$
To sum up: if k is even, then the sum from $2k+3$ to $2(\frac{k^2}{4} + 1)+1$ going only from odd to odd gives a perfect square.
Case 2: k is odd
We can express k as $2n+1$ and then it can easily be seen that:
$$(2n+1)^2+(2n^2+2n)^2 = (2n^2+2n+1)^2$$
Hence, by the same reasoning than before:
$$(2k+3)+(2k+5)+\cdots + (2(2n^2+2n+1)+1) = (2n^2+2n)^2$$
Meaning that the sum that goes from $2k+3$ to $2\left(2\left(\frac{k-1}{2}\right)^2+2\left(\frac{k-1}{2}\right)+1\right)+1$ is a perfect square.
This provides an answer for any odd number, but it is not the smallest possible answer. I will try to figure out how to get the smallest possible one.
Hope I was helpful
