ROSECODE 457
Integral circle packings 1
Three circles , and are placed inside a larger circle such that each pair of circles is tangent to one another and the inner circles do not overlap.

We can repeatedly fill the interstices between mutually tangent circles with further tangent circles and generate a circle packing. Denote the curvature of a circle be the reciprocal of its radius. Interestingly, every circle in such a packing would have integer curvature if the curvatures of four mutually tangent circles , , and are integers, and we call such a packing an integral circle packing.
The figure below shows an integral circle packing with curvatures of four circles -6, 11, 14 and 15 (each circle is labeled with its curvature and only part of circles are shown).

Define an integer quadruple ( , , , ) with representing the curvatures of initial four mutually tangent circles , , and , which determines the integral circle packing. The negative value here represents the negative curvature of the bounding circle. For example, the above integral circle packing can be represented as (-6, 11, 14, 15).
If greatest common divisor of , , , is 1, the quadruple ( , , , ) is called primitive quadruple. A quadruple ( , , , ) is a root quadruple if the curvature of any circle other than initial four circles in the circle packing is not less than . For example, (-6, 11, 14, 15) is a root quadruple but (-6, 11, 14, 23) not, because there exists curvature value 15 in the circle packing which is less than 23.
All curvatures (negative signs are omitted) of an integral circle packing form an infinite integer set. Especially there are infinite primes in the set if the quadruple for packing is primitive. For example, for primitive quadruple (-3, 4, 12, 13), the primes in the set are 3, 13, 37, 61, 109, 157, 181, 229 and so on. Let be sum of distinct primes no more than in the set with quadruple ( , , , ). For instance, (-3, 4, 12, 13, 100) = 114. Let be sum of all with primitive root quadruple ( , , , ) satisfying .
You are given (10, 100) = (-1, 2, 2, 3, 100) + (-2, 3, 6, 7, 100) + (-3, 5, 8, 8, 100) + (-4, 8, 9, 9, 100) = 299 + 251 + 90 + 147 = 787.
Find .

We can repeatedly fill the interstices between mutually tangent circles with further tangent circles and generate a circle packing. Denote the curvature of a circle be the reciprocal of its radius. Interestingly, every circle in such a packing would have integer curvature if the curvatures of four mutually tangent circles
The figure below shows an integral circle packing with curvatures of four circles -6, 11, 14 and 15 (each circle is labeled with its curvature and only part of circles are shown).

Define an integer quadruple (
If greatest common divisor of
All curvatures (negative signs are omitted) of an integral circle packing form an infinite integer set. Especially there are infinite primes in the set if the quadruple for packing is primitive. For example, for primitive quadruple (-3, 4, 12, 13), the primes in the set are 3, 13, 37, 61, 109, 157, 181, 229 and so on. Let
You are given
Find