Problem 29 » 履歴 » バージョン 1
Noppi, 2024/01/12 12:58
1 | 1 | Noppi | [ホーム](https://redmine.noppi.jp) - [[Wiki|Project Euler]] |
---|---|---|---|
2 | # [[Problem 29]] |
||
3 | |||
4 | ## Distinct Powers |
||
5 | <p>Consider all integer combinations of $a^b$ for $2 \le a \le 5$ and $2 \le b \le 5$:</p> |
||
6 | \begin{matrix} |
||
7 | 2^2=4, &2^3=8, &2^4=16, &2^5=32\\ |
||
8 | 3^2=9, &3^3=27, &3^4=81, &3^5=243\\ |
||
9 | 4^2=16, &4^3=64, &4^4=256, &4^5=1024\\ |
||
10 | 5^2=25, &5^3=125, &5^4=625, &5^5=3125 |
||
11 | \end{matrix} |
||
12 | If they are then placed in numerical order, with any repeats removed, we get the following sequence of $15$ distinct terms: |
||
13 | $$4, 8, 9, 16, 25, 27, 32, 64, 81, 125, 243, 256, 625, 1024, 3125.$$ |
||
14 | How many distinct terms are in the sequence generated by $a^b$ for $2 \le a \le 100$ and $2 \le b \le 100$? |
||
15 | |||
16 | ## 個別のべき乗 |
||
17 | <p>$2 \le a \le 5$ と $2 \le b \le 5$ について, $a^b$ を全て考えてみよう:</p> |
||
18 | \begin{matrix} |
||
19 | 2^2=4, &2^3=8, &2^4=16, &2^5=32\\ |
||
20 | 3^2=9, &3^3=27, &3^4=81, &3^5=243\\ |
||
21 | 4^2=16, &4^3=64, &4^4=256, &4^5=1024\\ |
||
22 | 5^2=25, &5^3=125, &5^4=625, &5^5=3125 |
||
23 | \end{matrix} |
||
24 | これらを小さい順に並べ, 同じ数を除いたとすると, 15個の項を得る: |
||
25 | $$4, 8, 9, 16, 25, 27, 32, 64, 81, 125, 243, 256, 625, 1024, 3125.$$ |
||
26 | $2 \le a \le 100$, $2 \le b \le 100$ で同じことをしたときいくつの異なる項が存在するか? |
||
27 | |||
28 | ```scheme |
||
29 | ``` |