2018-09-30 22:01:58 +00:00
---
id: 5900f52e1000cf542c510041
title: 'Problem 450: Hypocycloid and Lattice points'
2020-11-27 18:02:05 +00:00
challengeType: 5
2019-08-05 16:17:33 +00:00
forumTopicId: 302123
2021-01-13 02:31:00 +00:00
dashedName: problem-450-hypocycloid-and-lattice-points
2018-09-30 22:01:58 +00:00
---
2020-11-27 18:02:05 +00:00
# --description--
2018-09-30 22:01:58 +00:00
2020-11-27 18:02:05 +00:00
A hypocycloid is the curve drawn by a point on a small circle rolling inside a larger circle. The parametric equations of a hypocycloid centered at the origin, and starting at the right most point is given by:
2018-09-30 22:01:58 +00:00
2021-07-30 15:20:31 +00:00
$$x(t) = (R - r) \cos(t) + r \cos(\frac{R - r}{r}t)$$
2018-09-30 22:01:58 +00:00
2021-07-30 15:20:31 +00:00
$$y(t) = (R - r) \sin(t) - r \sin(\frac{R - r}{r} t)$$
2018-09-30 22:01:58 +00:00
2021-07-30 15:20:31 +00:00
Where $R$ is the radius of the large circle and $r$ the radius of the small circle.
2018-09-30 22:01:58 +00:00
2021-07-30 15:20:31 +00:00
Let $C(R, r)$ be the set of distinct points with integer coordinates on the hypocycloid with radius $R$ and $r$ and for which there is a corresponding value of $t$ such that $\sin(t)$ and $\cos(t)$ are rational numbers.
2018-09-30 22:01:58 +00:00
2021-07-30 15:20:31 +00:00
Let $S(R, r) = \sum\_{(x,y) \in C(R, r)} |x| + |y|$ be the sum of the absolute values of the $x$ and $y$ coordinates of the points in $C(R, r)$.
2018-09-30 22:01:58 +00:00
2021-07-30 15:20:31 +00:00
Let $T(N) = \sum_{R = 3}^N \sum_{r=1}^{\left\lfloor \frac{R - 1}{2} \right\rfloor} S(R, r)$ be the sum of $S(R, r)$ for $R$ and $r$ positive integers, $R\leq N$ and $2r < R$.
2018-09-30 22:01:58 +00:00
2021-07-30 15:20:31 +00:00
You are given:
2018-09-30 22:01:58 +00:00
2021-07-30 15:20:31 +00:00
$$\begin{align}
C(3, 1) = & \\{(3, 0), (-1, 2), (-1,0), (-1,-2)\\} \\\\
C(2500, 1000) = & \\{(2500, 0), (772, 2376), (772, -2376), (516, 1792), (516, -1792), (500, 0), (68, 504), \\\\
& (68, -504),(-1356, 1088), (-1356, -1088), (-1500, 1000), (-1500, -1000)\\}
\end{align}$$
2018-09-30 22:01:58 +00:00
2022-03-19 07:56:57 +00:00
**Note:** (-625, 0) is not an element of $C(2500, 1000)$ because $\sin(t)$ is not a rational number for the corresponding values of $t$.
2018-09-30 22:01:58 +00:00
2021-07-30 15:20:31 +00:00
$S(3, 1) = (|3| + |0|) + (|-1| + |2|) + (|-1| + |0|) + (|-1| + |-2|) = 10$
2018-09-30 22:01:58 +00:00
2021-07-30 15:20:31 +00:00
$T(3) = 10$; $T(10) = 524$; $T(100) = 580\\,442$; $T({10}^3) = 583\\,108\\,600$.
Find $T({10}^6)$.
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-30 15:20:31 +00:00
`hypocycloidAndLatticePoints()` should return `583333163984220900` .
2018-09-30 22:01:58 +00:00
2020-11-27 18:02:05 +00:00
```js
2021-07-30 15:20:31 +00:00
assert.strictEqual(hypocycloidAndLatticePoints(), 583333163984220900);
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-30 15:20:31 +00:00
function hypocycloidAndLatticePoints() {
2020-09-15 16:57:40 +00:00
2018-09-30 22:01:58 +00:00
return true;
}
2021-07-30 15:20:31 +00:00
hypocycloidAndLatticePoints();
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
```