Files
freeCodeCamp/curriculum/challenges/japanese/10-coding-interview-prep/project-euler/problem-341-golombs-self-describing-sequence.md
2022-04-02 17:46:30 +09:00

1.1 KiB

id, title, challengeType, forumTopicId, dashedName
id title challengeType forumTopicId dashedName
5900f4c11000cf542c50ffd3 問題 341: ゴロムの自己記述的数列 5 302000 problem-341-golombs-self-describing-sequence

--description--

ゴロムの自己記述的数列 (G(n)) は、数列内に n がちょうど G(n) 回現れるような、自然数の非減少数列です。 最初の数個の n に対する G(n) の値を次に示します。

$$\begin{array}{c} n & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 & 12 & 13 & 14 & 15 & \ldots \\ G(n) & 1 & 2 & 2 & 3 & 3 & 4 & 4 & 4 & 5 & 5 & 5 & 6 & 6 & 6 & 6 & \ldots \end{array}$$

G({10}^3) = 86, G({10}^6) = 6137 が与えられます。

また、1 ≤ n < {10}^3 のとき、\sum G(n^3) = 153\\,506\\,976 です。

1 ≤ n < {10}^6 のとき、\sum G(n^3) を求めなさい。

--hints--

golombsSequence()56098610614277016 を返す必要があります。

assert.strictEqual(golombsSequence(), 56098610614277016);

--seed--

--seed-contents--

function golombsSequence() {

  return true;
}

golombsSequence();

--solutions--

// solution required