Files
freeCodeCamp/curriculum/challenges/ukrainian/10-coding-interview-prep/project-euler/problem-203-squarefree-binomial-coefficients.md
2022-04-11 19:34:39 +05:30

51 lines
2.3 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
id: 5900f4381000cf542c50ff4a
title: 'Завдання 203: Вільні від квадратів біноміальні коефіцієнти'
challengeType: 5
forumTopicId: 301844
dashedName: problem-203-squarefree-binomial-coefficients
---
# --description--
Біноміальні коефіцієнти $\displaystyle\binom{n}{k}$ можна розташувати у формі трикутника (трикутник Паскаля) наступним чином:
$$\begin{array}{ccccccccccccccc} & & & & & & & 1 & & & & & & & \\\\
& & & & & & 1 & & 1 & & & & & & \\\\ & & & & & 1 & & 2 & & 1 & & & & & \\\\
& & & & 1 & & 3 & & 3 & & 1 & & & & \\\\ & & & 1 & & 4 & & 6 & & 4 & & 1 & & & \\\\
& & 1 & & 5 & & 10 & & 10 & & 5 & & 1 & & \\\\ & 1 & & 6 & & 15 & & 20 & & 15 & & 6 & & 1 & \\\\
1 & & 7 & & 21 & & 35 & & 35 & & 21 & & 7 & & 1 \\\\ & & & & & & & \ldots \end{array}$$
Можна побачити, що перші вісім рядків трикутника Паскаля містять дванадцять різних чисел: 1, 2, 3, 4, 5, 6, 7, 10, 15, 20, 21 та 35.
Додатне ціле число n називається безквадратним, якщо жоден квадрат простого числа не ділить n. З дванадцяти різних чисел в перших восьми рядках трикутника Паскаля, всі, окрім 4 та 20 є безквадратними. Сума різних безквадратних чисел в перших восьми рядках дорівнює 105.
Знайдіть суму різних безквадратних чисел у перших 51 рядках трикутника Паскаля.
# --hints--
`squarefreeBinomialCoefficients()` має видати `34029210557338`.
```js
assert.strictEqual(squarefreeBinomialCoefficients(), 34029210557338);
```
# --seed--
## --seed-contents--
```js
function squarefreeBinomialCoefficients() {
return true;
}
squarefreeBinomialCoefficients();
```
# --solutions--
```js
// solution required
```