Q27 from AMC 2012(Senior): Five consecutive integers that sum to a perfect square, and the three middle terms sum to a perfect cube. 
Five consecutive integers $p,q,r,s,t$,each less than $10000$, produce a sum which is a perfect square, while the sum of $q,r,s$ is a perfect cube.What is the value of $ \sqrt{p+q+r+s+t}$ ?

What I have tried so far:
Let $p=r-2$
$p+q+r+s+t =5r $
$5r=x^2 $
$q+r+s =3r =y^3 $
$x^2 -y^3 =2r $
So,the only perfect squares which are divisible by $5$ are the multiples of $5$: $25,100,225,400...$
I also observed that $100-25=75,225-100=125$,where $125-75=50$.Trying that for $225-100=125,400-225=175$ where $175-125=50$
Then,for the perfect cube which are divisible by 3 and must be less than the perfect squares.
$30^3,60^3,90^3,120^3....$
And here is were I got stuck at...
Is the concept I'm using correct?
 A: As $p+q+r+s+t = 5r$ and $q+r+s = 3r$ we have 
$$
5r = m^2, \quad 3r = n^3 \tag1
$$
for some integers $m$ and $n$. Thus $5\mid r$ and $3^2\mid r$, so $r = 5\cdot3^2\cdot r_1$ for som integer $r_1$. Substitute it to $(1)$:
$$
5^2\cdot 3^2\cdot r_1 = m^2, \quad 3^3\cdot 5\cdot r_1 = n^3. \tag2
$$
Thus $r_1$ is a perfect square ($r_1 = m_1^2$, where $m_1 = m/15)$ and $5^2\mid r_1$. One may see that $r_1 = 5^2\cdot r_2^2$, where $r_2$ is integer, satisfying bouth these conditions. Substitute it to $(2)$:
$$
5^2\cdot 3^2\cdot 5^2 \cdot r_2^2 = m^2, \quad 3^3 \cdot 5^3 \cdot r_2^2 = n^3.
$$
Now we see that $r_2^2$ is a perfect cube. But as $r < 10000$ and $r = 5\cdot 3^2\cdot 5^2\cdot r^2_2$ we get that $r_2^2 \le 8$. There is only one number less than or equal to $8$ which is bouth perfect square and perfect cube - it is $1$. So $r_2 = 1$ and $r = 5\cdot 3^2\cdot 5^2 = 1125$ and 
$$
\sqrt{p+q+r+s+t} = \sqrt{5r} = 3\cdot 5^2 = 75.
$$
A: The problem is that of finding the value of $\sqrt{5p+10}$ where $p$ is an integer less than 9995 such that
$$a^2=p+(p+1)+(p+2)+(p+3)+(p+4)=5p+10=5(p+2),$$
$$b^3=(p+1)+(p+2)+(p+3)=3p+6=3(p+2),$$
for some integers $a$ and $b$. Then $5\mid a$ and $3\mid b$, and hence $5\mid p+2$ and $3^2\mid p+2$, meaning that
$$p=45n-2,$$
for some integer $n$. It follows that
$$a^2=225n=3^2\times5^2\times n\qquad\text{ and }\qquad b^3=135n=3^3\times5\times n.$$
we see that the right-hand sides are squares resp. cubes for $n=5^2$. This yieds $p=1123$ and hence
$$a^2=5p+10=75^2\qquad\text{ and }\qquad b^3=3p+6=15^3.$$
Note that the next value of $n$ that works is $n=3^6\times5^2>10000$ and that $n$ cannot be negative, so
$$\sqrt{p+q+r+s+t}=75.$$
A: Since $\frac{3}{5}x^2=y^3$ is a cube, the number of factors of 5 in $x^2$ must be even and one more than a multiple of 3. So choices are $4$ and $10$. Also the number of factors of 3 in $x^2$ must be even and one less than a multiple of $3$, so choices are $2$ and $8$. Now, $\frac{x^2}{5} \le 10000$, so $x$ must be  a  multiple of $3\cdot 5^2 = 75$. And in fact $x=75$ (so $r = \frac{75^2}{5}=1125$) works.
