figurate_numbers 1.4.1 → 1.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/docs/ERRATA.md +71 -0
- data/docs/METHODS.md +262 -0
- data/lib/figurate_numbers/version.rb +1 -1
- metadata +5 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3f88663fb4b29da717f010c1f0316c6f43b84742bf90149c988f280af9642696
|
4
|
+
data.tar.gz: f96d3430868d3aa1e7fa9152586c90eb83cda937f6d2a3c87434cfdd4fe13241
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 725f757198c2c298a12331410c98bcf1a6c001675c9fc8f6244f0dec7023bba66f88a05eaaa2bae4e97edb9f08992ec168cf8fc660dafcd0ddd82ebbd37c9fa3
|
7
|
+
data.tar.gz: 62e57fdb8abf8546e6f5cca8c97eee63fbc9d9acba3f86299fed7619e75a97817c5de6dfdabea91927765f24557fa41df9c9797388969c2d9771177e7c914410
|
data/docs/ERRATA.md
ADDED
@@ -0,0 +1,71 @@
|
|
1
|
+
## Errata
|
2
|
+
|
3
|
+
- **Chapter 1, page 6:**
|
4
|
+
The formula for *Square* in the table is given as:
|
5
|
+
`1/2 (n^2 - 0 * n)`
|
6
|
+
It should be corrected to:
|
7
|
+
`1/2 (2n^2 - 0 * n)`
|
8
|
+
|
9
|
+
- **Chapter 1, page 51:**
|
10
|
+
The formula for *Centered icosihexagonal* numbers is listed as:
|
11
|
+
`1/3n^2 - 13n + 1`
|
12
|
+
with values `546, 728, 936, 1170`.
|
13
|
+
The correct formula and values are:
|
14
|
+
`13n^2 - 13n + 1`
|
15
|
+
with values `547, 729, 937, 1171`.
|
16
|
+
|
17
|
+
- **Chapter 1, page 51:**
|
18
|
+
The value for *Centered icosiheptagonal* number is given as `972`.
|
19
|
+
The correct value is `973`.
|
20
|
+
|
21
|
+
- **Chapter 1, page 51:**
|
22
|
+
The value for *Centered icosioctagonal* number is given as `84`.
|
23
|
+
The correct value is `85`.
|
24
|
+
|
25
|
+
- **Chapter 1, page 65:**
|
26
|
+
The term *polite numbers* is misspelled as:
|
27
|
+
`inpolite numbers`
|
28
|
+
It should read:
|
29
|
+
`impolite numbers`
|
30
|
+
|
31
|
+
- **Chapter 1, page 72:**
|
32
|
+
The formula for truncated centered pentagonal numbers (TCSS_5) is:
|
33
|
+
`TCSS_5(n) = (35n^2 - 55n) / 2 + 3`
|
34
|
+
It should be:
|
35
|
+
`TCSS_5(n) = (35n^2 - 55n) / 2 + 11`
|
36
|
+
|
37
|
+
- **Chapter 2, page 92:**
|
38
|
+
The formula for octagonal pyramidal numbers is stated as:
|
39
|
+
`n(n+1)(6n-1) / 6`
|
40
|
+
The correct formula is:
|
41
|
+
`n(n+1)(6n-3) / 6`
|
42
|
+
|
43
|
+
- **Chapter 2, page 140:**
|
44
|
+
The sequence for centered square pyramidal numbers is listed as:
|
45
|
+
`1, 6, 19, 44, 85, 111, 146, 231, ...`
|
46
|
+
The number `111` should be excluded, resulting in:
|
47
|
+
`1, 6, 19, 44, 85, 146, 231, ...`
|
48
|
+
|
49
|
+
- **Chapter 2, page 155:**
|
50
|
+
The formula for generalized centered tetrahedron numbers (S_3^3) is:
|
51
|
+
`S_3^3(n) = ((2n - 1)(n^2 + n + 3)) / 3`
|
52
|
+
It should include a negative sign:
|
53
|
+
`S_3^3(n) = ((2n - 1)(n^2 - n + 3)) / 3`
|
54
|
+
|
55
|
+
- **Chapter 2, page 156:**
|
56
|
+
The formula for generalized centered square pyramid numbers (S_4^3) is:
|
57
|
+
`S_4^3(n) = ((2n - 1)(n^2 - n + 2)^2) / 3`
|
58
|
+
The correct formula is:
|
59
|
+
`S_4^3(n) = ((2n - 1)(n^2 - n + 2)) / 2`
|
60
|
+
|
61
|
+
- **Chapter 3, page 188:**
|
62
|
+
The term *hyperoctahedral numbers* is incorrectly called:
|
63
|
+
`hexadecahoron numbers`
|
64
|
+
It should be:
|
65
|
+
`hexadecachoron numbers`
|
66
|
+
|
67
|
+
- **Chapter 3, page 190:**
|
68
|
+
The term *hypericosahedral numbers* is incorrectly written as:
|
69
|
+
`hexacisihoron numbers`
|
70
|
+
It should be:
|
71
|
+
`hexacosichoron numbers`
|
data/docs/METHODS.md
ADDED
@@ -0,0 +1,262 @@
|
|
1
|
+
# List of Implemented Sequences in `figurate_numbers`
|
2
|
+
|
3
|
+
### Table of Contents
|
4
|
+
- 🟦 [Plane Figurate Numbers](#1-plane-figurate-numbers)
|
5
|
+
- 🟥 [Space Figurate Numbers](#2-space-figurate-numbers)
|
6
|
+
- 🟨 [Multidimensional Figurate Numbers](#3-multidimensional-figurate-numbers)
|
7
|
+
- 🧬 [Zoo of figurate-related numbers](#6-zoo-of-figurate-related-numbers)
|
8
|
+
|
9
|
+
> Note that `=` means that you can call the same sequence with different names.
|
10
|
+
|
11
|
+
## 1. Plane Figurate Numbers
|
12
|
+
|
13
|
+
1. `polygonal(m)`
|
14
|
+
2. `triangular`
|
15
|
+
3. `square`
|
16
|
+
4. `pentagonal`
|
17
|
+
5. `hexagonal`
|
18
|
+
6. `heptagonal`
|
19
|
+
7. `octagonal`
|
20
|
+
8. `nonagonal`
|
21
|
+
9. `decagonal`
|
22
|
+
10. `hendecagonal`
|
23
|
+
11. `dodecagonal`
|
24
|
+
12. `tridecagonal`
|
25
|
+
13. `tetradecagonal`
|
26
|
+
14. `pentadecagonal`
|
27
|
+
15. `hexadecagonal`
|
28
|
+
16. `heptadecagonal`
|
29
|
+
17. `octadecagonal`
|
30
|
+
18. `nonadecagonal`
|
31
|
+
19. `icosagonal`
|
32
|
+
20. `icosihenagonal`
|
33
|
+
21. `icosidigonal`
|
34
|
+
22. `icositrigonal`
|
35
|
+
23. `icositetragonal`
|
36
|
+
24. `icosipentagonal`
|
37
|
+
25. `icosihexagonal`
|
38
|
+
26. `icosiheptagonal`
|
39
|
+
27. `icosioctagonal`
|
40
|
+
28. `icosinonagonal`
|
41
|
+
29. `triacontagonal`
|
42
|
+
30. `centered_triangular`
|
43
|
+
31. `centered_square` = `diamond` (equality only by quantity)
|
44
|
+
32. `centered_pentagonal`
|
45
|
+
33. `centered_hexagonal`
|
46
|
+
34. `centered_heptagonal`
|
47
|
+
35. `centered_octagonal`
|
48
|
+
36. `centered_nonagonal`
|
49
|
+
37. `centered_decagonal`
|
50
|
+
38. `centered_hendecagonal`
|
51
|
+
39. `centered_dodecagonal` = `star` (equality only by quantity)
|
52
|
+
40. `centered_tridecagonal`
|
53
|
+
41. `centered_tetradecagonal`
|
54
|
+
42. `centered_pentadecagonal`
|
55
|
+
43. `centered_hexadecagonal`
|
56
|
+
44. `centered_heptadecagonal`
|
57
|
+
45. `centered_octadecagonal`
|
58
|
+
46. `centered_nonadecagonal`
|
59
|
+
47. `centered_icosagonal`
|
60
|
+
48. `centered_icosihenagonal`
|
61
|
+
49. `centered_icosidigonal`
|
62
|
+
50. `centered_icositrigonal`
|
63
|
+
51. `centered_icositetragonal`
|
64
|
+
52. `centered_icosipentagonal`
|
65
|
+
53. `centered_icosihexagonal`
|
66
|
+
54. `centered_icosiheptagonal`
|
67
|
+
55. `centered_icosioctagonal`
|
68
|
+
56. `centered_icosinonagonal`
|
69
|
+
57. `centered_triacontagonal`
|
70
|
+
58. `centered_mgonal(m)`
|
71
|
+
59. `pronic` = `heteromecic` = `oblong`
|
72
|
+
60. `polite`
|
73
|
+
61. `impolite`
|
74
|
+
62. `cross`
|
75
|
+
63. `aztec_diamond`
|
76
|
+
64. `polygram(m)` = `centered_star_polygonal(m)`
|
77
|
+
65. `pentagram`
|
78
|
+
66. `gnomic`
|
79
|
+
67. `truncated_triangular`
|
80
|
+
68. `truncated_square`
|
81
|
+
69. `truncated_pronic`
|
82
|
+
70. `truncated_centered_pol(m)` = `truncated_centered_mgonal(m)`
|
83
|
+
71. `truncated_centered_triangular`
|
84
|
+
72. `truncated_centered_square`
|
85
|
+
73. `truncated_centered_pentagonal`
|
86
|
+
74. `truncated_centered_hexagonal` = `truncated_hex`
|
87
|
+
75. `generalized_mgonal(m, left_index = 0)`
|
88
|
+
76. `generalized_pentagonal(left_index = 0)`
|
89
|
+
77. `generalized_hexagonal(left_index = 0)`
|
90
|
+
78. `generalized_centered_pol(m, left_index = 0)`
|
91
|
+
79. `generalized_pronic(left_index = 0)`
|
92
|
+
|
93
|
+
## 2. Space Figurate Numbers
|
94
|
+
|
95
|
+
1. `r_pyramidal(r)`
|
96
|
+
2. `triangular_pyramidal = tetrahedral`
|
97
|
+
3. `square_pyramidal = pyramidal`
|
98
|
+
4. `pentagonal_pyramidal`
|
99
|
+
5. `hexagonal_pyramidal`
|
100
|
+
6. `heptagonal_pyramidal`
|
101
|
+
7. `octagonal_pyramidal`
|
102
|
+
8. `nonagonal_pyramidal`
|
103
|
+
9. `decagonal_pyramidal`
|
104
|
+
10. `hendecagonal_pyramidal`
|
105
|
+
11. `dodecagonal_pyramidal`
|
106
|
+
12. `tridecagonal_pyramidal`
|
107
|
+
13. `tetradecagonal_pyramidal`
|
108
|
+
14. `pentadecagonal_pyramidal`
|
109
|
+
15. `hexadecagonal_pyramidal`
|
110
|
+
16. `heptadecagonal_pyramidal`
|
111
|
+
17. `octadecagonal_pyramidal`
|
112
|
+
18. `nonadecagonal_pyramidal`
|
113
|
+
19. `icosagonal_pyramidal`
|
114
|
+
20. `icosihenagonal_pyramidal`
|
115
|
+
21. `icosidigonal_pyramidal`
|
116
|
+
22. `icositrigonal_pyramidal`
|
117
|
+
23. `icositetragonal_pyramidal`
|
118
|
+
24. `icosipentagonal_pyramidal`
|
119
|
+
25. `icosihexagonal_pyramidal`
|
120
|
+
26. `icosiheptagonal_pyramidal`
|
121
|
+
27. `icosioctagonal_pyramidal`
|
122
|
+
28. `icosinonagonal_pyramidal`
|
123
|
+
29. `triacontagonal_pyramidal`
|
124
|
+
30. `triangular_tetrahedral [finite]`
|
125
|
+
31. `triangular_square_pyramidal [finite]`
|
126
|
+
32. `square_tetrahedral [finite]`
|
127
|
+
33. `square_square_pyramidal [finite]`
|
128
|
+
34. `tetrahedral_square_pyramidal_number [finite]`
|
129
|
+
35. `cubic = perfect_cube != hex_pyramidal (equality only by quantity)`
|
130
|
+
36. `tetrahedral`
|
131
|
+
37. `octahedral`
|
132
|
+
38. `dodecahedral`
|
133
|
+
39. `icosahedral`
|
134
|
+
40. `truncated_tetrahedral`
|
135
|
+
41. `truncated_cubic`
|
136
|
+
42. `truncated_octahedral`
|
137
|
+
43. `stella_octangula`
|
138
|
+
44. `centered_cube`
|
139
|
+
45. `rhombic_dodecahedral`
|
140
|
+
46. `hauy_rhombic_dodecahedral`
|
141
|
+
47. `centered_tetrahedron = centered_tetrahedral`
|
142
|
+
48. `centered_square_pyramid = centered_pyramid`
|
143
|
+
49. `centered_mgonal_pyramid(m)`
|
144
|
+
50. `centered_pentagonal_pyramid != centered_octahedron (equality only in quantity)`
|
145
|
+
51. `centered_hexagonal_pyramid`
|
146
|
+
52. `centered_heptagonal_pyramid`
|
147
|
+
53. `centered_octagonal_pyramid`
|
148
|
+
54. `centered_octahedron`
|
149
|
+
55. `centered_icosahedron = centered_cuboctahedron`
|
150
|
+
56. `centered_dodecahedron`
|
151
|
+
57. `centered_truncated_tetrahedron`
|
152
|
+
58. `centered_truncated_cube`
|
153
|
+
59. `centered_truncated_octahedron`
|
154
|
+
60. `centered_mgonal_pyramidal(m)`
|
155
|
+
61. `centered_triangular_pyramidal`
|
156
|
+
62. `centered_square_pyramidal`
|
157
|
+
63. `centered_pentagonal_pyramidal`
|
158
|
+
64. `centered_hexagonal_pyramidal = hex_pyramidal`
|
159
|
+
65. `centered_heptagonal_pyramidal`
|
160
|
+
66. `centered_octagonal_pyramidal`
|
161
|
+
67. `centered_nonagonal_pyramidal`
|
162
|
+
68. `centered_decagonal_pyramidal`
|
163
|
+
69. `centered_hendecagonal_pyramidal`
|
164
|
+
70. `centered_dodecagonal_pyramidal`
|
165
|
+
71. `hexagonal_prism`
|
166
|
+
72. `mgonal_prism(m)`
|
167
|
+
73. `generalized_mgonal_pyramidal(m, left_index = 0)`
|
168
|
+
74. `generalized_pentagonal_pyramidal(left_index = 0)`
|
169
|
+
75. `generalized_hexagonal_pyramidal(left_index = 0)`
|
170
|
+
76. `generalized_cubic(left_index = 0)`
|
171
|
+
77. `generalized_octahedral(left_index = 0)`
|
172
|
+
78. `generalized_icosahedral(left_index = 0)`
|
173
|
+
79. `generalized_dodecahedral(left_index = 0)`
|
174
|
+
80. `generalized_centered_cube(left_index = 0)`
|
175
|
+
81. `generalized_centered_tetrahedron(left_index = 0)`
|
176
|
+
82. `generalized_centered_square_pyramid(left_index = 0)`
|
177
|
+
83. `generalized_rhombic_dodecahedral(left_index = 0)`
|
178
|
+
84. `generalized_centered_mgonal_pyramidal(m, left_index = 0)`
|
179
|
+
85. `generalized_mgonal_prism(m, left_index = 0)`
|
180
|
+
86. `generalized_hexagonal_prism(left_index = 0)`
|
181
|
+
|
182
|
+
## 3. Multidimensional figurate numbers
|
183
|
+
|
184
|
+
1. `pentatope = hypertetrahedral = triangulotriangular`
|
185
|
+
2. `k_dimensional_hypertetrahedron(k) = k_hypertetrahedron(k) = regular_k_polytopic(k) = figurate_numbers_of_order_k(k)`
|
186
|
+
3. `five_dimensional_hypertetrahedron`
|
187
|
+
4. `six_dimensional_hypertetrahedron`
|
188
|
+
5. `biquadratic`
|
189
|
+
6. `k_dimensional_hypercube(k) = k_hypercube(k)`
|
190
|
+
7. `five_dimensional_hypercube`
|
191
|
+
8. `six_dimensional_hypercube`
|
192
|
+
9. `hyperoctahedral = hexadecachoron = four_cross_polytope = four_orthoplex`
|
193
|
+
10. `hypericosahedral = tetraplex = polytetrahedron = hexacosichoron`
|
194
|
+
11. `hyperdodecahedral = hecatonicosachoron = dodecaplex = polydodecahedron`
|
195
|
+
12. `polyoctahedral = icositetrachoron = octaplex = hyperdiamond`
|
196
|
+
13. `four_dimensional_hyperoctahedron`
|
197
|
+
14. `five_dimensional_hyperoctahedron`
|
198
|
+
15. `six_dimensional_hyperoctahedron`
|
199
|
+
16. `seven_dimensional_hyperoctahedron`
|
200
|
+
17. `eight_dimensional_hyperoctahedron`
|
201
|
+
18. `nine_dimensional_hyperoctahedron`
|
202
|
+
19. `ten_dimensional_hyperoctahedron`
|
203
|
+
20. `k_dimensional_hyperoctahedron(k) = k_cross_polytope(k)`
|
204
|
+
21. `four_dimensional_mgonal_pyramidal(m) = mgonal_pyramidal_numbers_of_the_second_order(m)`
|
205
|
+
22. `four_dimensional_square_pyramidal`
|
206
|
+
23. `four_dimensional_pentagonal_pyramidal`
|
207
|
+
24. `four_dimensional_hexagonal_pyramidal`
|
208
|
+
25. `four_dimensional_heptagonal_pyramidal`
|
209
|
+
26. `four_dimensional_octagonal_pyramidal`
|
210
|
+
27. `four_dimensional_nonagonal_pyramidal`
|
211
|
+
28. `four_dimensional_decagonal_pyramidal`
|
212
|
+
29. `four_dimensional_hendecagonal_pyramidal`
|
213
|
+
30. `four_dimensional_dodecagonal_pyramidal`
|
214
|
+
31. `k_dimensional_mgonal_pyramidal(k, m) = mgonal_pyramidal_of_the_k_2_th_order(k, m)`
|
215
|
+
32. `five_dimensional_mgonal_pyramidal(m)`
|
216
|
+
33. `five_dimensional_square_pyramidal`
|
217
|
+
34. `five_dimensional_pentagonal_pyramidal`
|
218
|
+
35. `five_dimensional_hexagonal_pyramidal`
|
219
|
+
36. `five_dimensional_heptagonal_pyramidal`
|
220
|
+
37. `five_dimensional_octagonal_pyramidal`
|
221
|
+
38. `six_dimensional_mgonal_pyramidal(m)`
|
222
|
+
39. `six_dimensional_square_pyramidal`
|
223
|
+
40. `six_dimensional_pentagonal_pyramidal`
|
224
|
+
41. `six_dimensional_hexagonal_pyramidal`
|
225
|
+
42. `six_dimensional_heptagonal_pyramidal`
|
226
|
+
43. `six_dimensional_octagonal_pyramidal`
|
227
|
+
44. `centered_biquadratic`
|
228
|
+
45. `k_dimensional_centered_hypercube(k)`
|
229
|
+
46. `five_dimensional_centered_hypercube`
|
230
|
+
47. `six_dimensional_centered_hypercube`
|
231
|
+
48. `centered_polytope`
|
232
|
+
49. `k_dimensional_centered_hypertetrahedron(k)`
|
233
|
+
50. `five_dimensional_centered_hypertetrahedron(k)`
|
234
|
+
51. `six_dimensional_centered_hypertetrahedron(k)`
|
235
|
+
52. `centered_hyperoctahedral = orthoplex`
|
236
|
+
53. `nexus(k)`
|
237
|
+
54. `k_dimensional_centered_hyperoctahedron(k)`
|
238
|
+
55. `five_dimensional_centered_hyperoctahedron`
|
239
|
+
56. `six_dimensional_centered_hyperoctahedron`
|
240
|
+
57. `generalized_pentatope(left_index = 0)`
|
241
|
+
58. `generalized_k_dimensional_hypertetrahedron(k = 5, left_index = 0)`
|
242
|
+
59. `generalized_biquadratic(left_index = 0)`
|
243
|
+
60. `generalized_k_dimensional_hypercube(k = 5, left_index = 0)`
|
244
|
+
61. `generalized_hyperoctahedral(left_index = 0)`
|
245
|
+
62. `generalized_k_dimensional_hyperoctahedron(k = 5, left_index = 0) [even or odd dimension only changes sign]`
|
246
|
+
63. `generalized_hyperdodecahedral(left_index = 0)`
|
247
|
+
64. `generalized_hypericosahedral(left_index = 0)`
|
248
|
+
65. `generalized_polyoctahedral(left_index = 0)`
|
249
|
+
66. `generalized_k_dimensional_mgonal_pyramidal(k, m, left_index = 0)`
|
250
|
+
67. `generalized_k_dimensional_centered_hypercube(k, left_index = 0)`
|
251
|
+
68. `generalized_k_dimensional_centered_hypertetrahedron(k, left_index = 0)[provisional symmetry]`
|
252
|
+
69. `generalized_k_dimensional_centered_hyperoctahedron(k, left_index = 0)[provisional symmetry]`
|
253
|
+
70. `generalized_nexus(k, left_index = 0) [even or odd dimension only changes sign]`
|
254
|
+
|
255
|
+
### 6. Zoo of figurate-related numbers
|
256
|
+
|
257
|
+
1. `cuban_numbers = cuban_prime_numbers`
|
258
|
+
2. `quartan_numbers [Needs to improve the algorithmic complexity for n > 70]`
|
259
|
+
3. `pell_numbers`
|
260
|
+
4. `carmichael_numbers [Needs to improve the algorithmic complexity for n > 20]`
|
261
|
+
4. `stern_prime_numbers(infty = false) [Quick calculations up to 8 terms]`
|
262
|
+
5. `apocalyptic_numbers`
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: figurate_numbers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Edgar Armando Delgado Vega
|
@@ -19,8 +19,12 @@ executables: []
|
|
19
19
|
extensions: []
|
20
20
|
extra_rdoc_files:
|
21
21
|
- README.md
|
22
|
+
- docs/ERRATA.md
|
23
|
+
- docs/METHODS.md
|
22
24
|
files:
|
23
25
|
- README.md
|
26
|
+
- docs/ERRATA.md
|
27
|
+
- docs/METHODS.md
|
24
28
|
- lib/figurate_numbers.rb
|
25
29
|
- lib/figurate_numbers/multidimensional_figurate_numbers.rb
|
26
30
|
- lib/figurate_numbers/p_adic_utils/p_adic_utils.rb
|