---
id: 5900f37a1000cf542c50fe8d
challengeType: 5
title: 'Problem 14: Longest Collatz sequence'
videoUrl: ''
localeTitle: 'Задача 14: Самая длинная последовательность Collatz'
---

## Description
undefined

## Instructions
<section id="instructions">
</section>

## Tests
<section id='tests'>

```yml
tests:
  - text: <code>longestCollatzSequence(14)</code> должен вернуть 9.
    testString: 'assert.strictEqual(longestCollatzSequence(14), 9, "<code>longestCollatzSequence(14)</code> should return 9.");'
  - text: <code>longestCollatzSequence(5847)</code> должен вернуть 3711.
    testString: 'assert.strictEqual(longestCollatzSequence(5847), 3711, "<code>longestCollatzSequence(5847)</code> should return 3711.");'
  - text: <code>longestCollatzSequence(46500)</code> должен вернуть 35655.
    testString: 'assert.strictEqual(longestCollatzSequence(46500), 35655, "<code>longestCollatzSequence(46500)</code> should return 35655.");'
  - text: <code>longestCollatzSequence(54512)</code> должен вернуть 52527.
    testString: 'assert.strictEqual(longestCollatzSequence(54512), 52527, "<code>longestCollatzSequence(54512)</code> should return 52527.");'
  - text: <code>longestCollatzSequence(1000000)</code> должен вернуть 837799.
    testString: 'assert.strictEqual(longestCollatzSequence(1000000), 837799, "<code>longestCollatzSequence(1000000)</code> should return 837799.");'

```

</section>

## Challenge Seed
<section id='challengeSeed'>

<div id='js-seed'>

```js
function longestCollatzSequence(limit) {
  // Good luck!
  return true;
}

longestCollatzSequence(14);

```

</div>



</section>

## Solution
<section id='solution'>

```js
// solution required
```
</section>
