fix(curriculum): clean-up Project Euler 441-460 (#43068)

* fix: clean-up Project Euler 441-460

* fix: corrections from review

Co-authored-by: Tom <20648924+moT01@users.noreply.github.com>

Co-authored-by: Tom <20648924+moT01@users.noreply.github.com>
This commit is contained in:
gikf
2021-07-30 17:20:31 +02:00
committed by GitHub
parent d269909faa
commit a2b2ef3f75
20 changed files with 267 additions and 185 deletions

View File

@ -8,20 +8,26 @@ dashedName: problem-445-retractions-a
# --description--
For every integer n>1, the family of functions fn,a,b is defined
For every integer $n > 1$, the family of functions $f_{n, a, b}$ is defined by:
by fn,a,b(x)≡ax+b mod n for a,b,x integer and 0
$f_{n, a, b}(x) ≡ ax + b\bmod n$ for $a, b, x$ integer and $0 \lt a \lt n$, $0 \le b \lt n$, $0 \le x \lt n$.
You are given that ∑ R(c) for c=C(100 000,k), and 1 ≤ k ≤99 999 ≡628701600 (mod 1 000 000 007). (C(n,k) is the binomial coefficient).
We will call $f_{n, a, b}$ a retraction if $f_{n, a, b}(f_{n, a, b}(x)) \equiv f_{n, a, b}(x)\bmod n$ for every $0 \le x \lt n$.
Find ∑ R(c) for c=C(10 000 000,k), and 1 ≤k≤ 9 999 999. Give your answer modulo 1 000 000 007.
Let $R(n)$ be the number of retractions for $n$.
You are given that
$$\sum_{k = 1}^{99\\,999} R(\displaystyle\binom{100\\,000}{k}) \equiv 628\\,701\\,600\bmod 1\\,000\\,000\\,007$$
Find $$\sum_{k = 1}^{9\\,999\\,999} R(\displaystyle\binom{10\\,000\\,000}{k})$$ Give your answer modulo $1\\,000\\,000\\,007$.
# --hints--
`euler445()` should return 659104042.
`retractionsA()` should return `659104042`.
```js
assert.strictEqual(euler445(), 659104042);
assert.strictEqual(retractionsA(), 659104042);
```
# --seed--
@ -29,12 +35,12 @@ assert.strictEqual(euler445(), 659104042);
## --seed-contents--
```js
function euler445() {
function retractionsA() {
return true;
}
euler445();
retractionsA();
```
# --solutions--