2018-09-30 23:01:58 +01:00
---
id: 5900f5071000cf542c510018
title: 'Problem 410: Circle and tangent line'
2020-11-27 19:02:05 +01:00
challengeType: 5
2019-08-05 09:17:33 -07:00
forumTopicId: 302079
2021-01-13 03:31:00 +01:00
dashedName: problem-410-circle-and-tangent-line
2018-09-30 23:01:58 +01:00
---
2020-11-27 19:02:05 +01:00
# --description--
2021-07-29 19:48:24 +02:00
Let $C$ be the circle with radius $r$, $x^2 + y^2 = r^2$. We choose two points $P(a, b)$ and $Q(-a, c)$ so that the line passing through $P$ and $Q$ is tangent to $C$.
2018-09-30 23:01:58 +01:00
2021-07-29 19:48:24 +02:00
For example, the quadruplet $(r, a, b, c) = (2, 6, 2, -7)$ satisfies this property.
2018-09-30 23:01:58 +01:00
2021-07-29 19:48:24 +02:00
Let $F(R, X)$ be the number of the integer quadruplets $(r, a, b, c)$ with this property, and with $0 < r ≤ R$ and $0 < a ≤ X$.
2018-09-30 23:01:58 +01:00
2021-07-29 19:48:24 +02:00
We can verify that $F(1, 5) = 10$, $F(2, 10) = 52$ and $F(10, 100) = 3384$.
Find $F({10}^8, {10}^9) + F({10}^9, {10}^8)$.
2018-09-30 23:01:58 +01:00
2020-11-27 19:02:05 +01:00
# --hints--
2018-09-30 23:01:58 +01:00
2021-07-29 19:48:24 +02:00
`circleAndTangentLine()` should return `799999783589946600` .
2018-09-30 23:01:58 +01:00
2020-11-27 19:02:05 +01:00
```js
2021-07-29 19:48:24 +02:00
assert.strictEqual(circleAndTangentLine(), 799999783589946600);
2018-09-30 23:01:58 +01:00
```
2020-11-27 19:02:05 +01:00
# --seed--
2018-09-30 23:01:58 +01:00
2020-11-27 19:02:05 +01:00
## --seed-contents--
2018-09-30 23:01:58 +01:00
```js
2021-07-29 19:48:24 +02:00
function circleAndTangentLine() {
2020-09-15 09:57:40 -07:00
2018-09-30 23:01:58 +01:00
return true;
}
2021-07-29 19:48:24 +02:00
circleAndTangentLine();
2018-09-30 23:01:58 +01:00
```
2020-11-27 19:02:05 +01:00
# --solutions--
2018-09-30 23:01:58 +01:00
```js
// solution required
```