For coprime positive integers and , let be the curve defined by:
where varies between and .
For example, the images below show (left) and (right):
Define , where the sum is over all points (x, y) at which crosses itself.
For example, in the case of illustrated above, the curve crosses itself at two points: and , rounding coordinates to two decimal places, yielding . Some other examples are , , , and .
Let , where this sum is over all pairs of coprime integers with and .
You are given that and .
Find . Give your answer in scientific notation rounded to significant digits; for example would be given as 2.425650500e7.
Write-up coming later
The complete problem is available here. An approach, code, and answer will be added later.