2018-09-30 22:01:58 +00:00
---
id: 5900f4c11000cf542c50ffd3
2018-10-20 18:02:47 +00:00
title: 'Problem 341: Golomb''s self-describing sequence'
2020-11-27 18:02:05 +00:00
challengeType: 5
2019-08-05 16:17:33 +00:00
forumTopicId: 302000
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
2020-11-27 18:02:05 +00:00
The Golomb's self-describing sequence {G(n)} is the only nondecreasing sequence of natural numbers such that n appears exactly G(n) times in the sequence. The values of G(n) for the first few n are
2018-09-30 22:01:58 +00:00
n123456789101112131415…G(n)122334445556666…
2020-11-27 18:02:05 +00:00
You are given that G(103) = 86, G(106) = 6137. You are also given that ΣG(n3) = 153506976 for 1 ≤ n < 103.
2018-09-30 22:01:58 +00:00
2020-11-27 18:02:05 +00:00
Find ΣG(n3) for 1 ≤ n < 106.
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
2020-11-27 18:02:05 +00:00
`euler341()` should return 56098610614277016.
2018-09-30 22:01:58 +00:00
2020-11-27 18:02:05 +00:00
```js
assert.strictEqual(euler341(), 56098610614277016);
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
function euler341() {
2020-09-15 16:57:40 +00:00
2018-09-30 22:01:58 +00:00
return true;
}
euler341();
```
2020-11-27 18:02:05 +00:00
# --solutions--
2018-09-30 22:01:58 +00:00
```js
// solution required
```