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-446-retractions-b
# --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$.
F(N)=∑R(n4+4) for 1≤n≤N. F(1024)=77532377300600.
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 F(107) (mod 1 000 000 007)
Let $R(n)$ be the number of retractions for $n$.
$F(N) = \displaystyle\sum_{n = 1}^N R(n^4 + 4)$.
$F(1024) = 77\\,532\\,377\\,300\\,600$.
Find $F({10}^7)$. Give your answer modulo $1\\,000\\,000\\,007$.
# --hints--
`euler446()` should return 907803852.
`retractionsB()` should return `907803852`.
```js
assert.strictEqual(euler446(), 907803852);
assert.strictEqual(retractionsB(), 907803852);
```
# --seed--
@ -29,12 +35,12 @@ assert.strictEqual(euler446(), 907803852);
## --seed-contents--
```js
function euler446() {
function retractionsB() {
return true;
}
euler446();
retractionsB();
```
# --solutions--