2018-09-30 22:01:58 +00:00
---
id: 5900f43e1000cf542c50ff50
title: 'Problem 210: Obtuse Angled Triangles'
2020-11-27 18:02:05 +00:00
challengeType: 5
2019-08-05 16:17:33 +00:00
forumTopicId: 301852
2021-01-13 02:31:00 +00:00
dashedName: problem-210-obtuse-angled-triangles
2018-09-30 22:01:58 +00:00
---
2020-11-27 18:02:05 +00:00
# --description--
2021-07-15 07:20:31 +00:00
Consider the set $S(r)$ of points ($x$,$y$) with integer coordinates satisfying $|x| + |y| ≤ r$.
2020-11-27 18:02:05 +00:00
2021-07-15 07:20:31 +00:00
Let $O$ be the point (0,0) and $C$ the point ($\frac{r}{4}$,$\frac{r}{4}$).
2018-09-30 22:01:58 +00:00
2021-07-15 07:20:31 +00:00
Let $N(r)$ be the number of points $B$ in $S(r)$, so that the triangle $OBC$ has an obtuse angle, i.e. the largest angle $α $ satisfies $90°< α < 180°$.
2018-09-30 22:01:58 +00:00
2021-07-15 07:20:31 +00:00
So, for example, $N(4)=24$ and $N(8)=100$.
2018-09-30 22:01:58 +00:00
2021-07-15 07:20:31 +00:00
What is $N(1\\,000\\,000\\,000)$?
2018-09-30 22:01:58 +00:00
2020-11-27 18:02:05 +00:00
# --hints--
2018-09-30 22:01:58 +00:00
2021-07-15 07:20:31 +00:00
`obtuseAngledTriangles()` should return `1598174770174689500` .
2018-09-30 22:01:58 +00:00
2020-11-27 18:02:05 +00:00
```js
2021-07-15 07:20:31 +00:00
assert.strictEqual(obtuseAngledTriangles(), 1598174770174689500);
2018-09-30 22:01:58 +00:00
```
2020-11-27 18:02:05 +00:00
# --seed--
2018-09-30 22:01:58 +00:00
2020-11-27 18:02:05 +00:00
## --seed-contents--
2018-09-30 22:01:58 +00:00
```js
2021-07-15 07:20:31 +00:00
function obtuseAngledTriangles() {
2020-09-15 16:57:40 +00:00
2018-09-30 22:01:58 +00:00
return true;
}
2021-07-15 07:20:31 +00:00
obtuseAngledTriangles();
2018-09-30 22:01:58 +00:00
```
2020-11-27 18:02:05 +00:00
# --solutions--
2018-09-30 22:01:58 +00:00
```js
// solution required
```