2018-09-30 23:01:58 +01:00
---
id: 5900f3ba1000cf542c50fecd
challengeType: 5
title: 'Problem 78: Coin partitions'
2019-08-05 09:17:33 -07:00
forumTopicId: 302191
2018-09-30 23:01:58 +01:00
---
## Description
<section id='description'>
Let p(n) represent the number of different ways in which n coins can be separated into piles. For example, five coins can be separated into piles in exactly seven different ways, so p(5)=7.
2020-02-07 17:47:35 +09:00
<div style='text-align: center;'>
|Coin piles|
|--- |
|OOOOO|
|OOOO O|
|OOO OO|
|OOO O O|
|OO OO O|
|OO O O O|
|O O O O O|
</div>
Find the least value of <var>n</var> for which p(<var>n</var>) is divisible by one million.
2018-09-30 23:01:58 +01:00
Find the least value of n for which p(n) is divisible by one million.
</section>
## Instructions
<section id='instructions'>
</section>
## Tests
<section id='tests'>
```yml
2018-10-04 14:37:37 +01:00
tests:
- text: <code>euler78()</code> should return 55374.
2019-07-26 19:48:23 -07:00
testString: assert.strictEqual(euler78(), 55374);
2018-09-30 23:01:58 +01:00
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='js-seed'>
```js
function euler78() {
// Good luck!
return true;
}
euler78();
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
2019-07-18 08:24:12 -07:00
2018-09-30 23:01:58 +01:00
</section>