2018-09-30 22:01:58 +00:00
|
|
|
---
|
|
|
|
id: 5900f44e1000cf542c50ff60
|
|
|
|
title: 'Problem 225: Tribonacci non-divisors'
|
2020-11-27 18:02:05 +00:00
|
|
|
challengeType: 5
|
2019-08-05 16:17:33 +00:00
|
|
|
forumTopicId: 301868
|
2021-01-13 02:31:00 +00:00
|
|
|
dashedName: problem-225-tribonacci-non-divisors
|
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
|
|
|
The sequence 1, 1, 1, 3, 5, 9, 17, 31, 57, 105, 193, 355, 653, 1201 ...
|
|
|
|
|
2021-07-15 12:26:34 +00:00
|
|
|
is defined by $T_1 = T_2 = T_3 = 1$ and $T_n = T_{n - 1} + T_{n - 2} + T_{n - 3}$.
|
2018-09-30 22:01:58 +00:00
|
|
|
|
2021-07-15 12:26:34 +00:00
|
|
|
It can be shown that 27 does not divide any terms of this sequence. In fact, 27 is the first odd number with this property.
|
2018-09-30 22:01:58 +00:00
|
|
|
|
2021-07-15 12:26:34 +00:00
|
|
|
Find the ${124}^{\text{th}}$ odd number that does not divide any terms of the above sequence.
|
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 12:26:34 +00:00
|
|
|
`tribonacciNonDivisors()` should return `2009`.
|
2018-09-30 22:01:58 +00:00
|
|
|
|
2020-11-27 18:02:05 +00:00
|
|
|
```js
|
2021-07-15 12:26:34 +00:00
|
|
|
assert.strictEqual(tribonacciNonDivisors(), 2009);
|
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 12:26:34 +00:00
|
|
|
function tribonacciNonDivisors() {
|
2020-09-15 16:57:40 +00:00
|
|
|
|
2018-09-30 22:01:58 +00:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2021-07-15 12:26:34 +00:00
|
|
|
tribonacciNonDivisors();
|
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
|
|
|
|
```
|