4. On the table lie three balls, touching each other pairwise. The radii of the balls form a geometric progression with a common ratio $q \neq 1$. The radius of the middle one is 2012. Find the ratio of the sum of the squares of the sides of the triangle formed by the points of contact of the balls with the table to the sum of the sides of the triangle formed by the centers of the balls.

Answer: 4024
Let the radius of the smaller of the balls be $r$, then the radii of the others are $r q=2012$ and $r^{2}$, and the points of contact of the balls with the table are denoted as $A, B, C$ respectively. Consider the section of two balls by a plane perpendicular to the table and passing through the centers of these balls (see the figure, for the two smaller balls in size). Then for the balls shown in the figure, we get that $O A=r, O_{1} B=r q$ and $0 O_{1}=r+r q$. Further, $O_{1} D=0{ }_{1} D-D C=0{ }_{1} B-O A=r(q-1)$. From $\triangle O O_{1} D$ by the Pythagorean theorem, we get that $O D=2 r \sqrt{q}=A B$. Similarly, considering the remaining pairs of balls, we get that $A C=2 r q, B C=2 r q \sqrt{q}$, then the desired value is $\frac{4 r^{2} q+4 r^{2} q^{2}+4 r^{2} q^{3}}{r(1+q)+r\left(q+q^{2}\right)+r\left(1+q^{2}\right)}=2 r q=2 \cdot 2012=4024$

Recommendations for checking: 2 points for calculating all sides of the triangle formed by the points of contact of the balls.