Problem 71 » 履歴 » バージョン 1
Noppi, 2024/02/01 05:13
1 | 1 | Noppi | [ホーム](https://redmine.noppi.jp) - [[Wiki|Project Euler]] |
---|---|---|---|
2 | # [[Problem 71]] |
||
3 | |||
4 | ## Ordered Fractions |
||
5 | Consider the fraction, $\dfrac n d$, where $n$ and $d$ are positive integers. If $n \lt d$ and $\operatorname{HCF}(n,d)=1$, it is called a reduced proper fraction. |
||
6 | |||
7 | If we list the set of reduced proper fractions for $d \le 8$ in ascending order of size, we get: |
||
8 | $$\frac 1 8, \frac 1 7, \frac 1 6, \frac 1 5, \frac 1 4, \frac 2 7, \frac 1 3, \frac 3 8, \mathbf{\frac 2 5}, \frac 3 7, \frac 1 2, \frac 4 7, \frac 3 5, \frac 5 8, \frac 2 3, \frac 5 7, \frac 3 4, \frac 4 5, \frac 5 6, \frac 6 7, \frac 7 8$$ |
||
9 | |||
10 | It can be seen that $\dfrac 2 5$ is the fraction immediately to the left of $\dfrac 3 7$. |
||
11 | |||
12 | By listing the set of reduced proper fractions for $d \le 1\,000\,000$ in ascending order of size, find the numerator of the fraction immediately to the left of $\dfrac 3 7$. |
||
13 | |||
14 | ## 順序分数 |
||
15 | nとdを正の整数として, 分数 n/d を考えよう. n<d かつ HCF(n,d)=1 のとき, 真既約分数と呼ぶ. |
||
16 | |||
17 | d ≤ 8について既約分数を大きさ順に並べると, 以下を得る: |
||
18 | |||
19 | <div style="text-align:center">1/8, 1/7, 1/6, 1/5, 1/4, 2/7, 1/3, 3/8, <b>2/5</b> , 3/7, 1/2, 4/7, 3/5, 5/8, 2/3, 5/7, 3/4, 4/5, 5/6, 6/7, 7/8</div> |
||
20 | |||
21 | 3/7のすぐ左の分数は2/5である. |
||
22 | |||
23 | d ≤ 1,000,000について真既約分数を大きさ順に並べたとき, 3/7のすぐ左の分数の分子を求めよ. |
||
24 | |||
25 | ```scheme |
||
26 | ``` |