Take the circumcenter as the origin. Then vertices $A, B ,C$ become $\vec A,\vec B$ and $\vec C$ respectively, where $|\vec A|=|\vec B|=|\vec C|$. Also, let the circumcenter be $O$, centroid $G$, and orthocenter $H$.
Now, the centroid $G$ can be written as: $$G=\dfrac {\vec A+\vec B+\vec C}3\,.$$ Also we know that $\dfrac {HG}{GO}=\dfrac 21$, which means $$HO=3\cdot GO\implies HO=3\cdot\left( \dfrac {\vec A+\vec B+\vec C}3\right)={\vec A+\vec B+\vec C}\,.$$ Therefore, $$OH^2=(\vec A+\vec B+\vec C)\cdot(\vec A+\vec B+\vec C)=3R^2+2(\vec A\cdot\vec B+\vec B\cdot\vec C+\vec C\cdot\vec A)$$ Note that $$\begin{align}\vec A\cdot\vec B+\vec B\cdot\vec C+\vec C\cdot\vec A&=R^2(\cos {2A}+\cos {2B}+\cos {2C})\\&=3R^2-2R^2(\sin^2 A+\sin^2 B+\sin^2 C)\,.\end{align}$$ Finally, using the sine rule, we get $$OH^2=9R^2-(a^2+b^2+c^2)\,.$$
The result used above is the $\textit {Euler Line Theorem}$.
$\textbf {Proof:}$
Let $O$ the circumcenter of $\triangle ABC$ and $G$ its centroid. Extend $OG$ until a point $P$ such that $OG/GP=1/2$. We'll prove that $P$ is the orthocenter $H$.
Draw the median $AA'$ where $A'$ is the midpoint of $BC$. Triangles $OGA'$ and $PGA$ are similar, since $GP=2GO$, $AG=2A'G$ and $\angle OGA'=\angle PGA$. Then $\angle OA'G =\angle PGA$ and $OA'\parallel AP$. But $OA'\perp BC$ so $AP\perp BC$, that is, $AP$ is a height of the triangle.
Repeating the same argument for the other medians proves that $P$ lies on the three heights and therefore it must be the orthocenter $H$.
The ratio is $OG/GH=1/2$ since we constructed it that way.