69 lines
1.4 KiB
Markdown
69 lines
1.4 KiB
Markdown
---
|
||
id: 5900f4381000cf542c50ff4a
|
||
challengeType: 5
|
||
title: 'Problem 203: Squarefree Binomial Coefficients'
|
||
---
|
||
|
||
## Description
|
||
<section id='description'>
|
||
The binomial coefficients nCk can be arranged in triangular form, Pascal's triangle, like this:
|
||
|
||
|
||
111121133114641151010511615201561172135352171
|
||
.........
|
||
|
||
|
||
It can be seen that the first eight rows of Pascal's triangle contain twelve distinct numbers: 1, 2, 3, 4, 5, 6, 7, 10, 15, 20, 21 and 35.
|
||
|
||
A positive integer n is called squarefree if no square of a prime divides n.
|
||
Of the twelve distinct numbers in the first eight rows of Pascal's triangle, all except 4 and 20 are squarefree.
|
||
The sum of the distinct squarefree numbers in the first eight rows is 105.
|
||
|
||
Find the sum of the distinct squarefree numbers in the first 51 rows of Pascal's triangle.
|
||
</section>
|
||
|
||
## Instructions
|
||
<section id='instructions'>
|
||
|
||
</section>
|
||
|
||
## Tests
|
||
<section id='tests'>
|
||
|
||
```yml
|
||
tests:
|
||
- text: <code>euler203()</code> should return 34029210557338.
|
||
testString: 'assert.strictEqual(euler203(), 34029210557338, "<code>euler203()</code> should return 34029210557338.");'
|
||
|
||
```
|
||
|
||
</section>
|
||
|
||
## Challenge Seed
|
||
<section id='challengeSeed'>
|
||
|
||
<div id='js-seed'>
|
||
|
||
```js
|
||
function euler203() {
|
||
// Good luck!
|
||
return true;
|
||
}
|
||
|
||
euler203();
|
||
```
|
||
|
||
</div>
|
||
|
||
|
||
|
||
</section>
|
||
|
||
## Solution
|
||
<section id='solution'>
|
||
|
||
```js
|
||
// solution required
|
||
```
|
||
</section>
|