Problem 61 » 履歴 » バージョン 1
Noppi, 2024/01/26 06:50
1 | 1 | Noppi | [ホーム](https://redmine.noppi.jp) - [[Wiki|Project Euler]] |
---|---|---|---|
2 | # [[Problem 61]] |
||
3 | |||
4 | ## Cyclical Figurate Numbers |
||
5 | Triangle, square, pentagonal, hexagonal, heptagonal, and octagonal numbers are all figurate (polygonal) numbers and are generated by the following formulae: |
||
6 | |||
7 | | | | | |
||
8 | |--|--|--| |
||
9 | | Triangle | $P_{3,n}=n(n+1)/2$ | $1, 3, 6, 10, 15, \dots$ | |
||
10 | | Square | $P_{4,n}=n^2$ | $1, 4, 9, 16, 25, \dots$ | |
||
11 | | Pentagonal | $P_{5,n}=n(3n-1)/2$ | $1, 5, 12, 22, 35, \dots$ | |
||
12 | | Hexagonal | $P_{6,n}=n(2n-1)$ | $1, 6, 15, 28, 45, \dots$ | |
||
13 | | Heptagonal | $P_{7,n}=n(5n-3)/2$ | $1, 7, 18, 34, 55, \dots$ | |
||
14 | | Octagonal | $P_{8,n}=n(3n-2)$ | $1, 8, 21, 40, 65, \dots$ | |
||
15 | |||
16 | The ordered set of three $4$-digit numbers: $8128$, $2882$, $8281$, has three interesting properties. |
||
17 | |||
18 | 1. The set is cyclic, in that the last two digits of each number is the first two digits of the next number (including the last number with the first). |
||
19 | 1. Each polygonal type: triangle ($P_{3,127}=8128$), square ($P_{4,91}=8281$), and pentagonal ($P_{5,44}=2882$), is represented by a different number in the set. |
||
20 | 1. This is the only set of $4$-digit numbers with this property. |
||
21 | |||
22 | Find the sum of the only ordered set of six cyclic $4$-digit numbers for which each polygonal type: triangle, square, pentagonal, hexagonal, heptagonal, and octagonal, is represented by a different number in the set. |
||
23 | |||
24 | ## 巡回図形数 |
||
25 | 三角数, 四角数, 五角数, 六角数, 七角数, 八角数は多角数であり, それぞれ以下の式で生成される. |
||
26 | |||
27 | | | | | |
||
28 | |--|--|--| |
||
29 | | 三角数 | $P_{3,n}=n(n+1)/2$ | $1, 3, 6, 10, 15, \dots$ | |
||
30 | | 四角数 | $P_{4,n}=n^2$ | $1, 4, 9, 16, 25, \dots$ | |
||
31 | | 五角数 | $P_{5,n}=n(3n-1)/2$ | $1, 5, 12, 22, 35, \dots$ | |
||
32 | | 六角数 | $P_{6,n}=n(2n-1)$ | $1, 6, 15, 28, 45, \dots$ | |
||
33 | | 七角数 | $P_{7,n}=n(5n-3)/2$ | $1, 7, 18, 34, 55, \dots$ | |
||
34 | | 八角数 | $P_{8,n}=n(3n-2)$ | $1, 8, 21, 40, 65, \dots$ | |
||
35 | |||
36 | 3つの4桁の数の順番付きの集合 (8128, 2882, 8281) は以下の面白い性質を持つ. |
||
37 | |||
38 | 1. この集合は巡回的である. 最後の数も含めて, 各数の後半2桁は次の数の前半2桁と一致する |
||
39 | 1. それぞれ多角数である: 三角数 ($P_{3,127}=8128$), 四角数 ($P_{4,91}=8281$), 五角数 ($P_{5,44}=2882$) がそれぞれ別の数字で集合に含まれている |
||
40 | 1. $4$桁の数の組で上の2つの性質を持つのはこの組だけである. |
||
41 | |||
42 | 三角数, 四角数, 五角数, 六角数, 七角数, 八角数が全て表れる6つの巡回する4桁の数からなる唯一の順序集合の和を求めよ. |
||
43 | |||
44 | ```scheme |
||
45 | ``` |