Problem 70 » 履歴 » バージョン 1
Noppi, 2024/01/30 12:55
| 1 | 1 | Noppi | [ホーム](https://redmine.noppi.jp) - [[Wiki|Project Euler]] |
|---|---|---|---|
| 2 | # [[Problem 70]] |
||
| 3 | |||
| 4 | ## Totient Permutation |
||
| 5 | Euler's totient function, $\phi(n)$ [sometimes called the phi function], is used to determine the number of positive numbers less than or equal to $n$ which are relatively prime to $n$. For example, as $1, 2, 4, 5, 7$, and $8$, are all less than nine and relatively prime to nine, $\phi(9)=6$.<br>The number $1$ is considered to be relatively prime to every positive number, so $\phi(1)=1$. |
||
| 6 | |||
| 7 | Interestingly, $\phi(87109)=79180$, and it can be seen that $87109$ is a permutation of $79180$. |
||
| 8 | |||
| 9 | Find the value of $n$, $1 \lt n \lt 10^7$, for which $\phi(n)$ is a permutation of $n$ and the ratio $n/\phi(n)$ produces a minimum. |
||
| 10 | |||
| 11 | ## トーティエント関数の置換 |
||
| 12 | オイラーのトーティエント関数 φ(n) (ファイ関数とも呼ばれる) とは, n 未満の正の整数で n と互いに素なものの個数を表す. 例えば, 1, 2, 4, 5, 7, 8 は9未満で9と互いに素であるので, φ(9) = 6 となる. |
||
| 13 | 1 は全ての正の整数と互いに素であるとみなされる. よって φ(1) = 1 である. |
||
| 14 | |||
| 15 | 面白いことに, φ(87109)=79180 であり, 87109は79180を置換したものとなっている. |
||
| 16 | |||
| 17 | $1 \lt n \lt 10^7$ で φ(n) が n を置換したものになっているもののうち, n/φ(n) が最小となる n を求めよ. |
||
| 18 | |||
| 19 | ```scheme |
||
| 20 | ``` |