Files
freeCodeCamp/curriculum/challenges/english/08-coding-interview-prep/project-euler/problem-319-bounded-sequences.english.md
Randell Dawson a7eb800450 fix(curriculum): Remove unnecessary assert message argument from English Coding Interview Prep challenges - Project Euler - 04 (#36418)
* fix: removed assert msg argument-4

* fix: remove double quotes surrounding testString code

Co-Authored-By: Tom <20648924+moT01@users.noreply.github.com>
2019-07-27 07:34:19 -05:00

1.1 KiB

id, challengeType, title
id challengeType title
5900f4ab1000cf542c50ffbe 5 Problem 319: Bounded Sequences

Description

Let x1, x2,..., xn be a sequence of length n such that: x1 = 2 for all 1 < i ≤ n : xi-1 < xi for all i and j with 1 ≤ i, j ≤ n : (xi) j < (xj + 1)i

There are only five such sequences of length 2, namely: {2,4}, {2,5}, {2,6}, {2,7} and {2,8}. There are 293 such sequences of length 5; three examples are given below: {2,5,11,25,55}, {2,6,14,36,88}, {2,8,22,64,181}.

Let t(n) denote the number of such sequences of length n. You are given that t(10) = 86195 and t(20) = 5227991891.

Find t(1010) and give your answer modulo 109.

Instructions

Tests

tests:
  - text: <code>euler319()</code> should return 268457129.
    testString: assert.strictEqual(euler319(), 268457129);

Challenge Seed

function euler319() {
  // Good luck!
  return true;
}

euler319();

Solution

// solution required