2018-10-10 18:03:03 -04:00
---
id: 5900f4f91000cf542c51000c
challengeType: 5
title: 'Problem 397: Triangle on parabola'
2019-08-28 16:26:13 +03:00
forumTopicId: 302062
localeTitle: 'Problem 397: Triangle on parabola'
2018-10-10 18:03:03 -04:00
---
## Description
2019-08-28 16:26:13 +03:00
<section id='description'>
On the parabola y = x2/k, three points A(a, a2/k), B(b, b2/k) and C(c, c2/k) are chosen.
Let F(K, X) be the number of the integer quadruplets (k, a, b, c) such that at least one angle of the triangle ABC is 45-degree, with 1 ≤ k ≤ K and -X ≤ a < b < c ≤ X.
For example, F(1, 10) = 41 and F(10, 100) = 12492.
Find F(106, 109).
</section>
2018-10-10 18:03:03 -04:00
## Instructions
2019-08-28 16:26:13 +03:00
<section id='instructions'>
</section>
2018-10-10 18:03:03 -04:00
## Tests
<section id='tests'>
```yml
tests:
2019-08-28 16:26:13 +03:00
- text: <code>euler397()</code> should return 141630459461893730.
testString: assert.strictEqual(euler397(), 141630459461893730);
2018-10-10 18:03:03 -04:00
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='js-seed'>
```js
function euler397() {
// Good luck!
return true;
}
euler397();
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
2019-08-28 16:26:13 +03:00
2018-10-10 18:03:03 -04:00
</section>