2018-09-30 22:01:58 +00:00
|
|
|
|
---
|
|
|
|
|
id: 5900f4e61000cf542c50fff9
|
|
|
|
|
challengeType: 5
|
|
|
|
|
title: 'Problem 378: Triangle Triples'
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
## Description
|
|
|
|
|
<section id='description'>
|
|
|
|
|
Let T(n) be the nth triangle number, so T(n) =
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
n (n+1)2
|
|
|
|
|
|
|
|
|
|
.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Let dT(n) be the number of divisors of T(n).
|
|
|
|
|
E.g.:
|
|
|
|
|
T(7) = 28 and dT(7) = 6.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Let Tr(n) be the number of triples (i, j, k) such that 1 ≤ i < j < k ≤ n and dT(i) > dT(j) > dT(k).
|
|
|
|
|
Tr(20) = 14, Tr(100) = 5772 and Tr(1000) = 11174776.
|
|
|
|
|
|
|
|
|
|
|
2018-10-08 00:01:53 +00:00
|
|
|
|
Find Tr(60 000 000).
|
2018-09-30 22:01:58 +00:00
|
|
|
|
Give the last 18 digits of your answer.
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
## Instructions
|
|
|
|
|
<section id='instructions'>
|
|
|
|
|
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
## Tests
|
|
|
|
|
<section id='tests'>
|
|
|
|
|
|
|
|
|
|
```yml
|
2018-10-04 13:37:37 +00:00
|
|
|
|
tests:
|
|
|
|
|
- text: <code>euler378()</code> should return 147534623725724700.
|
2018-10-20 18:02:47 +00:00
|
|
|
|
testString: assert.strictEqual(euler378(), 147534623725724700, '<code>euler378()</code> should return 147534623725724700.');
|
2018-09-30 22:01:58 +00:00
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
## Challenge Seed
|
|
|
|
|
<section id='challengeSeed'>
|
|
|
|
|
|
|
|
|
|
<div id='js-seed'>
|
|
|
|
|
|
|
|
|
|
```js
|
|
|
|
|
function euler378() {
|
|
|
|
|
// Good luck!
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
euler378();
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
## Solution
|
|
|
|
|
<section id='solution'>
|
|
|
|
|
|
|
|
|
|
```js
|
|
|
|
|
// solution required
|
|
|
|
|
```
|
2019-07-18 15:24:12 +00:00
|
|
|
|
|
2018-09-30 22:01:58 +00:00
|
|
|
|
</section>
|