2018-10-10 22:03:03 +00:00
---
id: 5900f4761000cf542c50ff88
2021-02-06 04:42:36 +00:00
title: 'Problem 265: Binary Circles'
2018-10-10 22:03:03 +00:00
challengeType: 5
2021-02-06 04:42:36 +00:00
forumTopicId: 301914
2021-01-13 02:31:00 +00:00
dashedName: problem-265-binary-circles
2018-10-10 22:03:03 +00:00
---
2020-12-16 07:37:30 +00:00
# --description--
2018-10-10 22:03:03 +00:00
2021-02-06 04:42:36 +00:00
2N binary digits can be placed in a circle so that all the N-digit clockwise subsequences are distinct.
2018-10-10 22:03:03 +00:00
2021-02-06 04:42:36 +00:00
For N=3, two such circular arrangements are possible, ignoring rotations:
2018-10-10 22:03:03 +00:00
2021-02-06 04:42:36 +00:00
For the first arrangement, the 3-digit subsequences, in clockwise order, are: 000, 001, 010, 101, 011, 111, 110 and 100.
2018-10-10 22:03:03 +00:00
2021-02-06 04:42:36 +00:00
Each circular arrangement can be encoded as a number by concatenating the binary digits starting with the subsequence of all zeros as the most significant bits and proceeding clockwise. The two arrangements for N=3 are thus represented as 23 and 29: 00010111 2 = 23 00011101 2 = 29
2018-10-10 22:03:03 +00:00
2021-02-06 04:42:36 +00:00
Calling S(N) the sum of the unique numeric representations, we can see that S(3) = 23 + 29 = 52.
2018-10-10 22:03:03 +00:00
2021-02-06 04:42:36 +00:00
Find S(5).
2018-10-10 22:03:03 +00:00
2020-12-16 07:37:30 +00:00
# --hints--
2018-10-10 22:03:03 +00:00
2021-02-06 04:42:36 +00:00
`euler265()` should return 209110240768.
2018-10-10 22:03:03 +00:00
```js
2020-12-16 07:37:30 +00:00
assert.strictEqual(euler265(), 209110240768);
2018-10-10 22:03:03 +00:00
```
2020-08-13 15:24:35 +00:00
2021-01-13 02:31:00 +00:00
# --seed--
## --seed-contents--
```js
function euler265() {
return true;
}
euler265();
```
2020-12-16 07:37:30 +00:00
# --solutions--
2021-01-13 02:31:00 +00:00
```js
// solution required
```