figurate_numbers 1.5.3 → 1.6.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c819d42e433521e0eddbf3e162d7ae77a5edc47fd41e765dab159d420177ad2b
4
- data.tar.gz: 315923efe84388abd47d6585cc3852f9ae17d1373d51f0da54b7ec95938189a3
3
+ metadata.gz: 6c575029e13c230b19d1cb8b4cc4a76a6d087efe5ec7e9d5b76741b670ca06bb
4
+ data.tar.gz: 7331649bd186a6c8330a7212749f3b0a0bff240f3d1aceef5f739058b9436589
5
5
  SHA512:
6
- metadata.gz: fc2beb25d1deb6e4c2588e9150e69ac924d75392ba1a368a5d8548805c472cedb8dbc768a68c0b02a755c05a8fba206558bfa1cfcb1872fcb9afe1b889e56007
7
- data.tar.gz: 6e99f63cace53f3d167659024f6e70c5ae95818a1875c05f957a02f5aa7d77dd4999b76bbd9f9a7788fe11f2cd5f3fc6fd612c0d9028a3ccb4dacde0b3f491ae
6
+ metadata.gz: ba0eea2e4a2ff400ef8e4af5c2ae1cd1770f274d33675d2dd8e9779c6142205bd011f81b819c30ad0c5e7da8e0216652f8978d6a9b28f62c60c595b16444c683
7
+ data.tar.gz: 55688dc5e014a49033ee0972d833c92ba120d8657b92427b349ed6e53abf5befaa8f789770de7563d73c0b8d656e5e7e02e37ea5e25c9ec42a8511ac9c23a919
data/README.md CHANGED
@@ -10,10 +10,11 @@ It implements **241 infinite number sequences** inspired by the groundbreaking w
10
10
  <img src="https://img.shields.io/github/license/edelveart/figurate_numbers" alt="GitHub License">
11
11
  </p>
12
12
 
13
- [![figurate numbers image](https://raw.githubusercontent.com/edelveart/figurate_numbers/main/figurate_numbers.png)](https://rubygems.org/gems/figurate_numbers)
14
-
13
+ <p align="center">
14
+ <img src="https://raw.githubusercontent.com/edelveart/figurate_numbers/main/figurate_numbers.png" alt="Figurate Numbers Image" width="400">
15
+ </p>
15
16
 
16
- ## 💎 Installation
17
+ ## Installation
17
18
 
18
19
  Install it from the gem repository:
19
20
 
@@ -21,20 +22,21 @@ Install it from the gem repository:
21
22
  gem install figurate_numbers
22
23
  ```
23
24
 
24
- ## 🧊 Features
25
+ ## Features
25
26
 
26
27
  Figurate Numbers implements 241 infinite sequences using the Enumerator class in Ruby, each categorized by its geometric dimension. It is ideal for use in mathematical modeling, algorithmic composition, and integration with tools like Sonic Pi.
27
28
 
28
29
  The sequences are organized following the structure of the *Figurate Numbers* book:
29
30
 
30
- - 🟦 **PlaneFigurateNumbers**: 79 sequences (2D)
31
- - 🟥 **SpaceFigurateNumbers**: 86 sequences (3D)
32
- - 🟨 **MultiDimensionalFigurateNumbers**: 70 sequences (4D and beyond)
33
- - 🧬 **Zoo of figurate-related numbers**: 6 additional sequences *(included in the MultiDimensional module)*
34
- - ⚙️ **ArithTransform**: p-adic transformations and other arithmetic operations
31
+ - **PlaneFigurateNumbers**: 79 sequences (2D)
32
+ - **SpaceFigurateNumbers**: 86 sequences (3D)
33
+ - **MultiDimensionalFigurateNumbers**: 70 sequences (4D and beyond)
34
+ - **Zoo of figurate-related numbers**: 6 additional sequences *(included in the MultiDimensional module)*
35
+ - **ArithTransform**: p-adic transformations and other arithmetic operations
35
36
 
37
+ > See detailed list of sequences below
36
38
 
37
- ## 🧰 How to use in Ruby
39
+ ## How to use in Ruby
38
40
 
39
41
  ### Version 1.5.0
40
42
 
@@ -59,9 +61,8 @@ MultiDimensionalFigurateNumbers.six_dimensional_hyperoctahedron
59
61
  seq = MultiDimensionalFigurateNumbers.five_dimensional_hypercube.take(15)
60
62
  ArithTransform.ring_padic_val(seq, 3)
61
63
  ```
62
- > 📚 Explore the detailed list of figurate numbers and arithmetic transformations [here 🔍.](https://github.com/edelveart/figurate_numbers/blob/main/docs/METHODS.md)
63
64
 
64
- ## 🎶 How to use in Sonic Pi
65
+ ## How to use in Sonic Pi
65
66
 
66
67
  Simply copy the entry point path from the `lib/figurate_numbers.rb` file where the *gem* is installed.
67
68
 
@@ -87,14 +88,341 @@ The main change introduced after version **1.3.0** is that you must now import t
87
88
 
88
89
  See discussion in the [**Sonic Pi community thread right here!**](https://in-thread.sonic-pi.net/t/figurate-numbers-for-sonic-pi-new-ruby-gem-for-infinite-number-sequences-and-patterns/8962)
89
90
 
90
- ## 📚 List of Sequences in `figurate_numbers` and Arithmetic Transformations Methods
91
-
92
- Explore the complete list of figurate number sequences:
93
-
94
- - [View all implemented methods and sequences 🔍](https://github.com/edelveart/figurate_numbers/blob/main/docs/METHODS.md)
95
-
96
- ## 📝 Book Errata
97
-
98
- Corrections to formulas and data found in *Figurate Numbers* (2012):
99
-
100
- - [See full list of known errata 🔍](https://github.com/edelveart/figurate_numbers/blob/main/docs/ERRATA.md)
91
+ ## List of Sequences and Arithmetic Transformations Methods
92
+
93
+ ### 1. Plane Figurate Numbers
94
+
95
+ 1. `polygonal(m)`
96
+ 2. `triangular`
97
+ 3. `square`
98
+ 4. `pentagonal`
99
+ 5. `hexagonal`
100
+ 6. `heptagonal`
101
+ 7. `octagonal`
102
+ 8. `nonagonal`
103
+ 9. `decagonal`
104
+ 10. `hendecagonal`
105
+ 11. `dodecagonal`
106
+ 12. `tridecagonal`
107
+ 13. `tetradecagonal`
108
+ 14. `pentadecagonal`
109
+ 15. `hexadecagonal`
110
+ 16. `heptadecagonal`
111
+ 17. `octadecagonal`
112
+ 18. `nonadecagonal`
113
+ 19. `icosagonal`
114
+ 20. `icosihenagonal`
115
+ 21. `icosidigonal`
116
+ 22. `icositrigonal`
117
+ 23. `icositetragonal`
118
+ 24. `icosipentagonal`
119
+ 25. `icosihexagonal`
120
+ 26. `icosiheptagonal`
121
+ 27. `icosioctagonal`
122
+ 28. `icosinonagonal`
123
+ 29. `triacontagonal`
124
+ 30. `centered_triangular`
125
+ 31. `centered_square` = `diamond` (equality only by quantity)
126
+ 32. `centered_pentagonal`
127
+ 33. `centered_hexagonal`
128
+ 34. `centered_heptagonal`
129
+ 35. `centered_octagonal`
130
+ 36. `centered_nonagonal`
131
+ 37. `centered_decagonal`
132
+ 38. `centered_hendecagonal`
133
+ 39. `centered_dodecagonal` = `star` (equality only by quantity)
134
+ 40. `centered_tridecagonal`
135
+ 41. `centered_tetradecagonal`
136
+ 42. `centered_pentadecagonal`
137
+ 43. `centered_hexadecagonal`
138
+ 44. `centered_heptadecagonal`
139
+ 45. `centered_octadecagonal`
140
+ 46. `centered_nonadecagonal`
141
+ 47. `centered_icosagonal`
142
+ 48. `centered_icosihenagonal`
143
+ 49. `centered_icosidigonal`
144
+ 50. `centered_icositrigonal`
145
+ 51. `centered_icositetragonal`
146
+ 52. `centered_icosipentagonal`
147
+ 53. `centered_icosihexagonal`
148
+ 54. `centered_icosiheptagonal`
149
+ 55. `centered_icosioctagonal`
150
+ 56. `centered_icosinonagonal`
151
+ 57. `centered_triacontagonal`
152
+ 58. `centered_mgonal(m)`
153
+ 59. `pronic` = `heteromecic` = `oblong`
154
+ 60. `polite`
155
+ 61. `impolite`
156
+ 62. `cross`
157
+ 63. `aztec_diamond`
158
+ 64. `polygram(m)` = `centered_star_polygonal(m)`
159
+ 65. `pentagram`
160
+ 66. `gnomonic`
161
+ 67. `truncated_triangular`
162
+ 68. `truncated_square`
163
+ 69. `truncated_pronic`
164
+ 70. `truncated_centered_pol(m)` = `truncated_centered_mgonal(m)`
165
+ 71. `truncated_centered_triangular`
166
+ 72. `truncated_centered_square`
167
+ 73. `truncated_centered_pentagonal`
168
+ 74. `truncated_centered_hexagonal` = `truncated_hex`
169
+ 75. `generalized_mgonal(m, left_index = 0)`
170
+ 76. `generalized_pentagonal(left_index = 0)`
171
+ 77. `generalized_hexagonal(left_index = 0)`
172
+ 78. `generalized_centered_pol(m, left_index = 0)`
173
+ 79. `generalized_pronic(left_index = 0)`
174
+
175
+ ### 2. Space Figurate Numbers
176
+
177
+ 1. `r_pyramidal(r)`
178
+ 2. `triangular_pyramidal = tetrahedral`
179
+ 3. `square_pyramidal = pyramidal`
180
+ 4. `pentagonal_pyramidal`
181
+ 5. `hexagonal_pyramidal`
182
+ 6. `heptagonal_pyramidal`
183
+ 7. `octagonal_pyramidal`
184
+ 8. `nonagonal_pyramidal`
185
+ 9. `decagonal_pyramidal`
186
+ 10. `hendecagonal_pyramidal`
187
+ 11. `dodecagonal_pyramidal`
188
+ 12. `tridecagonal_pyramidal`
189
+ 13. `tetradecagonal_pyramidal`
190
+ 14. `pentadecagonal_pyramidal`
191
+ 15. `hexadecagonal_pyramidal`
192
+ 16. `heptadecagonal_pyramidal`
193
+ 17. `octadecagonal_pyramidal`
194
+ 18. `nonadecagonal_pyramidal`
195
+ 19. `icosagonal_pyramidal`
196
+ 20. `icosihenagonal_pyramidal`
197
+ 21. `icosidigonal_pyramidal`
198
+ 22. `icositrigonal_pyramidal`
199
+ 23. `icositetragonal_pyramidal`
200
+ 24. `icosipentagonal_pyramidal`
201
+ 25. `icosihexagonal_pyramidal`
202
+ 26. `icosiheptagonal_pyramidal`
203
+ 27. `icosioctagonal_pyramidal`
204
+ 28. `icosinonagonal_pyramidal`
205
+ 29. `triacontagonal_pyramidal`
206
+ 30. `triangular_tetrahedral [finite]`
207
+ 31. `triangular_square_pyramidal [finite]`
208
+ 32. `square_tetrahedral [finite]`
209
+ 33. `square_square_pyramidal [finite]`
210
+ 34. `tetrahedral_square_pyramidal_number [finite]`
211
+ 35. `cubic = perfect_cube != hex_pyramidal (equality only by quantity)`
212
+ 36. `tetrahedral`
213
+ 37. `octahedral`
214
+ 38. `dodecahedral`
215
+ 39. `icosahedral`
216
+ 40. `truncated_tetrahedral`
217
+ 41. `truncated_cubic`
218
+ 42. `truncated_octahedral`
219
+ 43. `stella_octangula`
220
+ 44. `centered_cube`
221
+ 45. `rhombic_dodecahedral`
222
+ 46. `hauy_rhombic_dodecahedral`
223
+ 47. `centered_tetrahedron = centered_tetrahedral`
224
+ 48. `centered_square_pyramid = centered_pyramid`
225
+ 49. `centered_mgonal_pyramid(m)`
226
+ 50. `centered_pentagonal_pyramid != centered_octahedron (equality only in quantity)`
227
+ 51. `centered_hexagonal_pyramid`
228
+ 52. `centered_heptagonal_pyramid`
229
+ 53. `centered_octagonal_pyramid`
230
+ 54. `centered_octahedron`
231
+ 55. `centered_icosahedron = centered_cuboctahedron`
232
+ 56. `centered_dodecahedron`
233
+ 57. `centered_truncated_tetrahedron`
234
+ 58. `centered_truncated_cube`
235
+ 59. `centered_truncated_octahedron`
236
+ 60. `centered_mgonal_pyramidal(m)`
237
+ 61. `centered_triangular_pyramidal`
238
+ 62. `centered_square_pyramidal`
239
+ 63. `centered_pentagonal_pyramidal`
240
+ 64. `centered_hexagonal_pyramidal = hex_pyramidal`
241
+ 65. `centered_heptagonal_pyramidal`
242
+ 66. `centered_octagonal_pyramidal`
243
+ 67. `centered_nonagonal_pyramidal`
244
+ 68. `centered_decagonal_pyramidal`
245
+ 69. `centered_hendecagonal_pyramidal`
246
+ 70. `centered_dodecagonal_pyramidal`
247
+ 71. `hexagonal_prism`
248
+ 72. `mgonal_prism(m)`
249
+ 73. `generalized_mgonal_pyramidal(m, left_index = 0)`
250
+ 74. `generalized_pentagonal_pyramidal(left_index = 0)`
251
+ 75. `generalized_hexagonal_pyramidal(left_index = 0)`
252
+ 76. `generalized_cubic(left_index = 0)`
253
+ 77. `generalized_octahedral(left_index = 0)`
254
+ 78. `generalized_icosahedral(left_index = 0)`
255
+ 79. `generalized_dodecahedral(left_index = 0)`
256
+ 80. `generalized_centered_cube(left_index = 0)`
257
+ 81. `generalized_centered_tetrahedron(left_index = 0)`
258
+ 82. `generalized_centered_square_pyramid(left_index = 0)`
259
+ 83. `generalized_rhombic_dodecahedral(left_index = 0)`
260
+ 84. `generalized_centered_mgonal_pyramidal(m, left_index = 0)`
261
+ 85. `generalized_mgonal_prism(m, left_index = 0)`
262
+ 86. `generalized_hexagonal_prism(left_index = 0)`
263
+
264
+ ### 3. Multidimensional figurate numbers
265
+
266
+ 1. `pentatope = hypertetrahedral = triangulotriangular`
267
+ 2. `k_dimensional_hypertetrahedron(k) = k_hypertetrahedron(k) = regular_k_polytopic(k) = figurate_numbers_of_order_k(k)`
268
+ 3. `five_dimensional_hypertetrahedron`
269
+ 4. `six_dimensional_hypertetrahedron`
270
+ 5. `biquadratic`
271
+ 6. `k_dimensional_hypercube(k) = k_hypercube(k)`
272
+ 7. `five_dimensional_hypercube`
273
+ 8. `six_dimensional_hypercube`
274
+ 9. `hyperoctahedral = hexadecachoron = four_cross_polytope = four_orthoplex`
275
+ 10. `hypericosahedral = tetraplex = polytetrahedron = hexacosichoron`
276
+ 11. `hyperdodecahedral = hecatonicosachoron = dodecaplex = polydodecahedron`
277
+ 12. `polyoctahedral = icositetrachoron = octaplex = hyperdiamond`
278
+ 13. `four_dimensional_hyperoctahedron`
279
+ 14. `five_dimensional_hyperoctahedron`
280
+ 15. `six_dimensional_hyperoctahedron`
281
+ 16. `seven_dimensional_hyperoctahedron`
282
+ 17. `eight_dimensional_hyperoctahedron`
283
+ 18. `nine_dimensional_hyperoctahedron`
284
+ 19. `ten_dimensional_hyperoctahedron`
285
+ 20. `k_dimensional_hyperoctahedron(k) = k_cross_polytope(k)`
286
+ 21. `four_dimensional_mgonal_pyramidal(m) = mgonal_pyramidal_numbers_of_the_second_order(m)`
287
+ 22. `four_dimensional_square_pyramidal`
288
+ 23. `four_dimensional_pentagonal_pyramidal`
289
+ 24. `four_dimensional_hexagonal_pyramidal`
290
+ 25. `four_dimensional_heptagonal_pyramidal`
291
+ 26. `four_dimensional_octagonal_pyramidal`
292
+ 27. `four_dimensional_nonagonal_pyramidal`
293
+ 28. `four_dimensional_decagonal_pyramidal`
294
+ 29. `four_dimensional_hendecagonal_pyramidal`
295
+ 30. `four_dimensional_dodecagonal_pyramidal`
296
+ 31. `k_dimensional_mgonal_pyramidal(k, m) = mgonal_pyramidal_of_the_k_2_th_order(k, m)`
297
+ 32. `five_dimensional_mgonal_pyramidal(m)`
298
+ 33. `five_dimensional_square_pyramidal`
299
+ 34. `five_dimensional_pentagonal_pyramidal`
300
+ 35. `five_dimensional_hexagonal_pyramidal`
301
+ 36. `five_dimensional_heptagonal_pyramidal`
302
+ 37. `five_dimensional_octagonal_pyramidal`
303
+ 38. `six_dimensional_mgonal_pyramidal(m)`
304
+ 39. `six_dimensional_square_pyramidal`
305
+ 40. `six_dimensional_pentagonal_pyramidal`
306
+ 41. `six_dimensional_hexagonal_pyramidal`
307
+ 42. `six_dimensional_heptagonal_pyramidal`
308
+ 43. `six_dimensional_octagonal_pyramidal`
309
+ 44. `centered_biquadratic`
310
+ 45. `k_dimensional_centered_hypercube(k)`
311
+ 46. `five_dimensional_centered_hypercube`
312
+ 47. `six_dimensional_centered_hypercube`
313
+ 48. `centered_polytope`
314
+ 49. `k_dimensional_centered_hypertetrahedron(k)`
315
+ 50. `five_dimensional_centered_hypertetrahedron(k)`
316
+ 51. `six_dimensional_centered_hypertetrahedron(k)`
317
+ 52. `centered_hyperoctahedral = orthoplex`
318
+ 53. `nexus(k)`
319
+ 54. `k_dimensional_centered_hyperoctahedron(k)`
320
+ 55. `five_dimensional_centered_hyperoctahedron`
321
+ 56. `six_dimensional_centered_hyperoctahedron`
322
+ 57. `generalized_pentatope(left_index = 0)`
323
+ 58. `generalized_k_dimensional_hypertetrahedron(k = 5, left_index = 0)`
324
+ 59. `generalized_biquadratic(left_index = 0)`
325
+ 60. `generalized_k_dimensional_hypercube(k = 5, left_index = 0)`
326
+ 61. `generalized_hyperoctahedral(left_index = 0)`
327
+ 62. `generalized_k_dimensional_hyperoctahedron(k = 5, left_index = 0) [even or odd dimension only changes sign]`
328
+ 63. `generalized_hyperdodecahedral(left_index = 0)`
329
+ 64. `generalized_hypericosahedral(left_index = 0)`
330
+ 65. `generalized_polyoctahedral(left_index = 0)`
331
+ 66. `generalized_k_dimensional_mgonal_pyramidal(k, m, left_index = 0)`
332
+ 67. `generalized_k_dimensional_centered_hypercube(k, left_index = 0)`
333
+ 68. `generalized_k_dimensional_centered_hypertetrahedron(k, left_index = 0)[provisional symmetry]`
334
+ 69. `generalized_k_dimensional_centered_hyperoctahedron(k, left_index = 0)[provisional symmetry]`
335
+ 70. `generalized_nexus(k, left_index = 0) [even or odd dimension only changes sign]`
336
+
337
+ ### 4. Zoo of figurate-related numbers
338
+
339
+ 1. `cuban = cuban_prime`
340
+ 2. `quartan [Needs to improve the algorithmic complexity for n > 70]`
341
+ 3. `pell`
342
+ 4. `carmichael [Needs to improve the algorithmic complexity for n > 20]`
343
+ 4. `stern_prime(infty = false) [Quick calculations up to 8 terms]`
344
+ 5. `apocalyptic`
345
+
346
+ ### 5. Arithmetic Transformations
347
+
348
+ 1. `ArithTransform.padic_val(n, p)`
349
+ 2. `ArithTransform.ring_padic_val(seq, p)`
350
+ 3. `ArithTransform.padic_norm(n, p)`
351
+ 4. `ArithTransform.ring_padic_norm(seq, p)`
352
+ 5. `ArithTransform.padic_expansion(n, p, precision = 11, reverse: false)`
353
+ 6. `ArithTransform.ring_padic_expansion(seq, p, precision = 11, reverse: false)`
354
+ 7. `ArithTransform.figuratenomial(n, k, seq)`
355
+ 8. `ArithTransform.n_residue(n, pow, mod)`
356
+ 9. `ArithTransform.pc_inversion(n, mod)`
357
+
358
+ ## Book Errata
359
+
360
+ - **Chapter 1, page 6:**
361
+ The formula for *Square* in the table is given as:
362
+ `1/2 (n^2 - 0 * n)`
363
+ It should be corrected to:
364
+ `1/2 (2n^2 - 0 * n)`
365
+
366
+ - **Chapter 1, page 51:**
367
+ The formula for *Centered icosihexagonal* numbers is listed as:
368
+ `1/3n^2 - 13n + 1`
369
+ with values `546, 728, 936, 1170`.
370
+ The correct formula and values are:
371
+ `13n^2 - 13n + 1`
372
+ with values `547, 729, 937, 1171`.
373
+
374
+ - **Chapter 1, page 51:**
375
+ The value for *Centered icosiheptagonal* number is given as `972`.
376
+ The correct value is `973`.
377
+
378
+ - **Chapter 1, page 51:**
379
+ The value for *Centered icosioctagonal* number is given as `84`.
380
+ The correct value is `85`.
381
+
382
+ - **Chapter 1, page 65:**
383
+ The term *polite numbers* is misspelled as:
384
+ `inpolite numbers`
385
+ It should read:
386
+ `impolite numbers`
387
+
388
+ - **Chapter 1, page 72:**
389
+ The formula for truncated centered pentagonal numbers (TCSS_5) is:
390
+ `TCSS_5(n) = (35n^2 - 55n) / 2 + 3`
391
+ It should be:
392
+ `TCSS_5(n) = (35n^2 - 55n) / 2 + 11`
393
+
394
+ - **Chapter 2, page 92:**
395
+ The formula for octagonal pyramidal numbers is stated as:
396
+ `n(n+1)(6n-1) / 6`
397
+ The correct formula is:
398
+ `n(n+1)(6n-3) / 6`
399
+
400
+ - **Chapter 2, page 140:**
401
+ The sequence for centered square pyramidal numbers is listed as:
402
+ `1, 6, 19, 44, 85, 111, 146, 231, ...`
403
+ The number `111` should be excluded, resulting in:
404
+ `1, 6, 19, 44, 85, 146, 231, ...`
405
+
406
+ - **Chapter 2, page 155:**
407
+ The formula for generalized centered tetrahedron numbers (S_3^3) is:
408
+ `S_3^3(n) = ((2n - 1)(n^2 + n + 3)) / 3`
409
+ It should include a negative sign:
410
+ `S_3^3(n) = ((2n - 1)(n^2 - n + 3)) / 3`
411
+
412
+ - **Chapter 2, page 156:**
413
+ The formula for generalized centered square pyramid numbers (S_4^3) is:
414
+ `S_4^3(n) = ((2n - 1)(n^2 - n + 2)^2) / 3`
415
+ The correct formula is:
416
+ `S_4^3(n) = ((2n - 1)(n^2 - n + 2)) / 2`
417
+
418
+ - **Chapter 3, page 188:**
419
+ The term *hyperoctahedral numbers* is incorrectly called:
420
+ `hexadecahoron numbers`
421
+ It should be:
422
+ `hexadecachoron numbers`
423
+
424
+ - **Chapter 3, page 190:**
425
+ The term *hypericosahedral numbers* is incorrectly written as:
426
+ `hexacisihoron numbers`
427
+ It should be:
428
+ `hexacosichoron numbers`
@@ -43,5 +43,9 @@ module FigurateNumbers
43
43
  PAdicUtils.padic_expansion(delta, p, precision, reverse)
44
44
  end
45
45
  end
46
+
47
+ def figuratenomial(n, k, seq)
48
+ Utils.figurate_binomial(n, k, seq)
49
+ end
46
50
  end
47
51
  end
@@ -16,7 +16,7 @@ module FigurateNumbers
16
16
  alias hypertetrahedral pentatope
17
17
  alias triangulotriangular pentatope
18
18
 
19
- def k_dimensional_hypertetrahedron(k)
19
+ def reference_of_book_k_dimensional_hypertetrahedron(k)
20
20
  Enumerator.new do |y|
21
21
  (1..Float::INFINITY).each do |delta|
22
22
  y << Utils.rising_factorial(delta, k) / Utils.factorial_iter(k)
@@ -24,6 +24,18 @@ module FigurateNumbers
24
24
  end
25
25
  end
26
26
 
27
+ def k_dimensional_hypertetrahedron(k)
28
+ Enumerator.new do |y|
29
+ delta = 1
30
+ bin_coeff = 1
31
+ loop do
32
+ y << bin_coeff
33
+ bin_coeff = bin_coeff * (delta + k) / delta
34
+ delta += 1
35
+ end
36
+ end
37
+ end
38
+
27
39
  alias k_hypertetrahedron k_dimensional_hypertetrahedron
28
40
  alias regular_k_polytopic k_dimensional_hypertetrahedron
29
41
  alias figurate_numbers_of_order_k k_dimensional_hypertetrahedron
@@ -704,7 +716,7 @@ module FigurateNumbers
704
716
 
705
717
  require 'prime'
706
718
 
707
- def cuban_numbers
719
+ def cuban
708
720
  Enumerator.new do |y|
709
721
  (1..Float::INFINITY).each do |delta|
710
722
  y << (delta + 1)**3 - delta**3
@@ -712,9 +724,9 @@ module FigurateNumbers
712
724
  end
713
725
  end
714
726
 
715
- alias cuban_prime_numbers cuban_numbers
727
+ alias cuban_prime cuban
716
728
 
717
- def helper_quartan_numbers(delta)
729
+ def helper_quartan(delta)
718
730
  seq = [2]
719
731
  (1..delta).each do |x|
720
732
  (x + 1..delta).each do |y|
@@ -725,17 +737,17 @@ module FigurateNumbers
725
737
  seq.sort
726
738
  end
727
739
 
728
- private_class_method :helper_quartan_numbers
740
+ private_class_method :helper_quartan
729
741
 
730
- def quartan_numbers
742
+ def quartan
731
743
  Enumerator.new do |y|
732
744
  (1..Float::INFINITY).each do |delta|
733
- y << helper_quartan_numbers(delta)[delta - 1]
745
+ y << helper_quartan(delta)[delta - 1]
734
746
  end
735
747
  end
736
748
  end
737
749
 
738
- def pell_numbers
750
+ def pell
739
751
  pell_numbers = [0, 1]
740
752
  Enumerator.new do |y|
741
753
  y << 0
@@ -752,17 +764,7 @@ module FigurateNumbers
752
764
  end
753
765
  end
754
766
 
755
- def helper_carmichael_number_math_def(n)
756
- return if prime_number?(n)
757
-
758
- (2..(n - 1)).each do |a|
759
- next unless n.gcd(a) == 1
760
- return nil if a.pow(n - 1, n) != 1
761
- end
762
- n
763
- end
764
-
765
- def helper_carmichael_number(n)
767
+ def helper_carmichael(n)
766
768
  return if Prime.prime?(n)
767
769
 
768
770
  is_carmichael = (2..Math.sqrt(n)).none? do |a|
@@ -772,19 +774,18 @@ module FigurateNumbers
772
774
  end
773
775
 
774
776
  private_class_method :prime_number?
775
- private_class_method :helper_carmichael_number_math_def
776
- private_class_method :helper_carmichael_number
777
+ private_class_method :helper_carmichael
777
778
 
778
- def carmichael_numbers
779
+ def carmichael
779
780
  Enumerator.new do |y|
780
781
  (561..Float::INFINITY).each do |delta|
781
- num_seq = helper_carmichael_number(delta)
782
+ num_seq = helper_carmichael(delta)
782
783
  y << num_seq unless num_seq.nil?
783
784
  end
784
785
  end
785
786
  end
786
787
 
787
- def helper_stern_prime_numbers(delta)
788
+ def helper_stern_prime(delta)
788
789
  prime_list = Prime.first(delta)
789
790
  q = prime_list[-1]
790
791
  b = 1
@@ -797,19 +798,19 @@ module FigurateNumbers
797
798
  q
798
799
  end
799
800
 
800
- private_class_method :helper_stern_prime_numbers
801
+ private_class_method :helper_stern_prime
801
802
 
802
- def stern_prime_numbers(infty = false) # rubocop:disable Style/OptionalBooleanParameter
803
+ def stern_prime(infty = false) # rubocop:disable Style/OptionalBooleanParameter
803
804
  Enumerator.new do |y|
804
805
  max_term = infty == false ? 238 : float::INFINITY
805
806
  (1..max_term).each do |delta|
806
- num_seq = helper_stern_prime_numbers(delta)
807
+ num_seq = helper_stern_prime(delta)
807
808
  y << num_seq unless num_seq.nil?
808
809
  end
809
810
  end
810
811
  end
811
812
 
812
- def helper_apocalyptic_numbers(delta)
813
+ def helper_apocalyptic(delta)
813
814
  search_666 = (2**delta).to_s # rubocop:disable Naming/VariableNumber
814
815
  len_666 = search_666.length - 1 # rubocop:disable Naming/VariableNumber
815
816
  (0..len_666).each do |index|
@@ -818,12 +819,12 @@ module FigurateNumbers
818
819
  nil
819
820
  end
820
821
 
821
- private_class_method :helper_apocalyptic_numbers
822
+ private_class_method :helper_apocalyptic
822
823
 
823
- def apocalyptic_numbers
824
+ def apocalyptic
824
825
  Enumerator.new do |y|
825
826
  (157..Float::INFINITY).each do |delta|
826
- y << helper_apocalyptic_numbers(delta) unless helper_apocalyptic_numbers(delta).nil?
827
+ y << helper_apocalyptic(delta) unless helper_apocalyptic(delta).nil?
827
828
  end
828
829
  end
829
830
  end
@@ -532,7 +532,7 @@ module FigurateNumbers
532
532
  end
533
533
  end
534
534
 
535
- def gnomic
535
+ def gnomonic
536
536
  Enumerator.new do |y|
537
537
  (1..Float::INFINITY).each do |delta|
538
538
  y << 2 * delta - 1
@@ -34,5 +34,32 @@ module FigurateNumbers
34
34
  def pseudo_pochhammer_function(n, k)
35
35
  (n..(n + k - 2)).reduce(:*)
36
36
  end
37
+
38
+ def figurate_binomial(n, k, seq)
39
+ raise ArgumentError, "n must be a non-negative Integer" unless n.is_a?(Integer) && n >= 0
40
+ raise ArgumentError, "k must be an Integer between 0 and n" unless k.is_a?(Integer) && k.between?(0, n)
41
+
42
+ k = [k, n - k].min
43
+
44
+ first = []
45
+ last = []
46
+ (1..n).each do |i|
47
+ value = seq.next
48
+ first << value if i <= k
49
+ last << value if i > n - k
50
+ end
51
+
52
+ numerator = 1
53
+ denominator = 1
54
+ k.times do |i|
55
+ numerator *= last[i]
56
+ denominator *= first[i]
57
+
58
+ gcd = numerator.gcd(denominator)
59
+ numerator /= gcd
60
+ denominator /= gcd
61
+ end
62
+ denominator == 1 ? numerator : Rational(numerator, denominator)
63
+ end
37
64
  end
38
65
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FigurateNumbers
4
- VERSION = '1.5.3'
4
+ VERSION = '1.6.0'
5
5
  end
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.5.3
4
+ version: 1.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Edgar Armando Delgado Vega
@@ -13,20 +13,14 @@ description: Generates 241 infinite sequences of plane, space, and multidimensio
13
13
  figurate numbers based on the book ‘Figurate Numbers’ (2012) by Elena Deza and Michel
14
14
  Deza. The methods are implemented using the Enumerator class and are designed for
15
15
  use in your math projects or in Sonic Pi.
16
- email:
17
- - edelve91@gmail.com
18
16
  executables: []
19
17
  extensions: []
20
18
  extra_rdoc_files:
21
19
  - LICENSE
22
20
  - README.md
23
- - docs/ERRATA.md
24
- - docs/METHODS.md
25
21
  files:
26
22
  - LICENSE
27
23
  - README.md
28
- - docs/ERRATA.md
29
- - docs/METHODS.md
30
24
  - lib/figurate_numbers.rb
31
25
  - lib/figurate_numbers/arith_transform.rb
32
26
  - lib/figurate_numbers/multidimensional_figurate_numbers.rb
data/docs/ERRATA.md DELETED
@@ -1,71 +0,0 @@
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 DELETED
@@ -1,274 +0,0 @@
1
- # List of Sequences in `figurate_numbers` and Arithmetic Transformations Methods
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](#4-zoo-of-figurate-related-numbers)
8
- - ⚙️ [Arithmetic Transformations](#5-arithmetic-transformations)
9
-
10
- > Note that `=` means that you can call the same sequence with different names.
11
-
12
- ## 1. Plane Figurate Numbers
13
-
14
- 1. `polygonal(m)`
15
- 2. `triangular`
16
- 3. `square`
17
- 4. `pentagonal`
18
- 5. `hexagonal`
19
- 6. `heptagonal`
20
- 7. `octagonal`
21
- 8. `nonagonal`
22
- 9. `decagonal`
23
- 10. `hendecagonal`
24
- 11. `dodecagonal`
25
- 12. `tridecagonal`
26
- 13. `tetradecagonal`
27
- 14. `pentadecagonal`
28
- 15. `hexadecagonal`
29
- 16. `heptadecagonal`
30
- 17. `octadecagonal`
31
- 18. `nonadecagonal`
32
- 19. `icosagonal`
33
- 20. `icosihenagonal`
34
- 21. `icosidigonal`
35
- 22. `icositrigonal`
36
- 23. `icositetragonal`
37
- 24. `icosipentagonal`
38
- 25. `icosihexagonal`
39
- 26. `icosiheptagonal`
40
- 27. `icosioctagonal`
41
- 28. `icosinonagonal`
42
- 29. `triacontagonal`
43
- 30. `centered_triangular`
44
- 31. `centered_square` = `diamond` (equality only by quantity)
45
- 32. `centered_pentagonal`
46
- 33. `centered_hexagonal`
47
- 34. `centered_heptagonal`
48
- 35. `centered_octagonal`
49
- 36. `centered_nonagonal`
50
- 37. `centered_decagonal`
51
- 38. `centered_hendecagonal`
52
- 39. `centered_dodecagonal` = `star` (equality only by quantity)
53
- 40. `centered_tridecagonal`
54
- 41. `centered_tetradecagonal`
55
- 42. `centered_pentadecagonal`
56
- 43. `centered_hexadecagonal`
57
- 44. `centered_heptadecagonal`
58
- 45. `centered_octadecagonal`
59
- 46. `centered_nonadecagonal`
60
- 47. `centered_icosagonal`
61
- 48. `centered_icosihenagonal`
62
- 49. `centered_icosidigonal`
63
- 50. `centered_icositrigonal`
64
- 51. `centered_icositetragonal`
65
- 52. `centered_icosipentagonal`
66
- 53. `centered_icosihexagonal`
67
- 54. `centered_icosiheptagonal`
68
- 55. `centered_icosioctagonal`
69
- 56. `centered_icosinonagonal`
70
- 57. `centered_triacontagonal`
71
- 58. `centered_mgonal(m)`
72
- 59. `pronic` = `heteromecic` = `oblong`
73
- 60. `polite`
74
- 61. `impolite`
75
- 62. `cross`
76
- 63. `aztec_diamond`
77
- 64. `polygram(m)` = `centered_star_polygonal(m)`
78
- 65. `pentagram`
79
- 66. `gnomic`
80
- 67. `truncated_triangular`
81
- 68. `truncated_square`
82
- 69. `truncated_pronic`
83
- 70. `truncated_centered_pol(m)` = `truncated_centered_mgonal(m)`
84
- 71. `truncated_centered_triangular`
85
- 72. `truncated_centered_square`
86
- 73. `truncated_centered_pentagonal`
87
- 74. `truncated_centered_hexagonal` = `truncated_hex`
88
- 75. `generalized_mgonal(m, left_index = 0)`
89
- 76. `generalized_pentagonal(left_index = 0)`
90
- 77. `generalized_hexagonal(left_index = 0)`
91
- 78. `generalized_centered_pol(m, left_index = 0)`
92
- 79. `generalized_pronic(left_index = 0)`
93
-
94
- ## 2. Space Figurate Numbers
95
-
96
- 1. `r_pyramidal(r)`
97
- 2. `triangular_pyramidal = tetrahedral`
98
- 3. `square_pyramidal = pyramidal`
99
- 4. `pentagonal_pyramidal`
100
- 5. `hexagonal_pyramidal`
101
- 6. `heptagonal_pyramidal`
102
- 7. `octagonal_pyramidal`
103
- 8. `nonagonal_pyramidal`
104
- 9. `decagonal_pyramidal`
105
- 10. `hendecagonal_pyramidal`
106
- 11. `dodecagonal_pyramidal`
107
- 12. `tridecagonal_pyramidal`
108
- 13. `tetradecagonal_pyramidal`
109
- 14. `pentadecagonal_pyramidal`
110
- 15. `hexadecagonal_pyramidal`
111
- 16. `heptadecagonal_pyramidal`
112
- 17. `octadecagonal_pyramidal`
113
- 18. `nonadecagonal_pyramidal`
114
- 19. `icosagonal_pyramidal`
115
- 20. `icosihenagonal_pyramidal`
116
- 21. `icosidigonal_pyramidal`
117
- 22. `icositrigonal_pyramidal`
118
- 23. `icositetragonal_pyramidal`
119
- 24. `icosipentagonal_pyramidal`
120
- 25. `icosihexagonal_pyramidal`
121
- 26. `icosiheptagonal_pyramidal`
122
- 27. `icosioctagonal_pyramidal`
123
- 28. `icosinonagonal_pyramidal`
124
- 29. `triacontagonal_pyramidal`
125
- 30. `triangular_tetrahedral [finite]`
126
- 31. `triangular_square_pyramidal [finite]`
127
- 32. `square_tetrahedral [finite]`
128
- 33. `square_square_pyramidal [finite]`
129
- 34. `tetrahedral_square_pyramidal_number [finite]`
130
- 35. `cubic = perfect_cube != hex_pyramidal (equality only by quantity)`
131
- 36. `tetrahedral`
132
- 37. `octahedral`
133
- 38. `dodecahedral`
134
- 39. `icosahedral`
135
- 40. `truncated_tetrahedral`
136
- 41. `truncated_cubic`
137
- 42. `truncated_octahedral`
138
- 43. `stella_octangula`
139
- 44. `centered_cube`
140
- 45. `rhombic_dodecahedral`
141
- 46. `hauy_rhombic_dodecahedral`
142
- 47. `centered_tetrahedron = centered_tetrahedral`
143
- 48. `centered_square_pyramid = centered_pyramid`
144
- 49. `centered_mgonal_pyramid(m)`
145
- 50. `centered_pentagonal_pyramid != centered_octahedron (equality only in quantity)`
146
- 51. `centered_hexagonal_pyramid`
147
- 52. `centered_heptagonal_pyramid`
148
- 53. `centered_octagonal_pyramid`
149
- 54. `centered_octahedron`
150
- 55. `centered_icosahedron = centered_cuboctahedron`
151
- 56. `centered_dodecahedron`
152
- 57. `centered_truncated_tetrahedron`
153
- 58. `centered_truncated_cube`
154
- 59. `centered_truncated_octahedron`
155
- 60. `centered_mgonal_pyramidal(m)`
156
- 61. `centered_triangular_pyramidal`
157
- 62. `centered_square_pyramidal`
158
- 63. `centered_pentagonal_pyramidal`
159
- 64. `centered_hexagonal_pyramidal = hex_pyramidal`
160
- 65. `centered_heptagonal_pyramidal`
161
- 66. `centered_octagonal_pyramidal`
162
- 67. `centered_nonagonal_pyramidal`
163
- 68. `centered_decagonal_pyramidal`
164
- 69. `centered_hendecagonal_pyramidal`
165
- 70. `centered_dodecagonal_pyramidal`
166
- 71. `hexagonal_prism`
167
- 72. `mgonal_prism(m)`
168
- 73. `generalized_mgonal_pyramidal(m, left_index = 0)`
169
- 74. `generalized_pentagonal_pyramidal(left_index = 0)`
170
- 75. `generalized_hexagonal_pyramidal(left_index = 0)`
171
- 76. `generalized_cubic(left_index = 0)`
172
- 77. `generalized_octahedral(left_index = 0)`
173
- 78. `generalized_icosahedral(left_index = 0)`
174
- 79. `generalized_dodecahedral(left_index = 0)`
175
- 80. `generalized_centered_cube(left_index = 0)`
176
- 81. `generalized_centered_tetrahedron(left_index = 0)`
177
- 82. `generalized_centered_square_pyramid(left_index = 0)`
178
- 83. `generalized_rhombic_dodecahedral(left_index = 0)`
179
- 84. `generalized_centered_mgonal_pyramidal(m, left_index = 0)`
180
- 85. `generalized_mgonal_prism(m, left_index = 0)`
181
- 86. `generalized_hexagonal_prism(left_index = 0)`
182
-
183
- ## 3. Multidimensional figurate numbers
184
-
185
- 1. `pentatope = hypertetrahedral = triangulotriangular`
186
- 2. `k_dimensional_hypertetrahedron(k) = k_hypertetrahedron(k) = regular_k_polytopic(k) = figurate_numbers_of_order_k(k)`
187
- 3. `five_dimensional_hypertetrahedron`
188
- 4. `six_dimensional_hypertetrahedron`
189
- 5. `biquadratic`
190
- 6. `k_dimensional_hypercube(k) = k_hypercube(k)`
191
- 7. `five_dimensional_hypercube`
192
- 8. `six_dimensional_hypercube`
193
- 9. `hyperoctahedral = hexadecachoron = four_cross_polytope = four_orthoplex`
194
- 10. `hypericosahedral = tetraplex = polytetrahedron = hexacosichoron`
195
- 11. `hyperdodecahedral = hecatonicosachoron = dodecaplex = polydodecahedron`
196
- 12. `polyoctahedral = icositetrachoron = octaplex = hyperdiamond`
197
- 13. `four_dimensional_hyperoctahedron`
198
- 14. `five_dimensional_hyperoctahedron`
199
- 15. `six_dimensional_hyperoctahedron`
200
- 16. `seven_dimensional_hyperoctahedron`
201
- 17. `eight_dimensional_hyperoctahedron`
202
- 18. `nine_dimensional_hyperoctahedron`
203
- 19. `ten_dimensional_hyperoctahedron`
204
- 20. `k_dimensional_hyperoctahedron(k) = k_cross_polytope(k)`
205
- 21. `four_dimensional_mgonal_pyramidal(m) = mgonal_pyramidal_numbers_of_the_second_order(m)`
206
- 22. `four_dimensional_square_pyramidal`
207
- 23. `four_dimensional_pentagonal_pyramidal`
208
- 24. `four_dimensional_hexagonal_pyramidal`
209
- 25. `four_dimensional_heptagonal_pyramidal`
210
- 26. `four_dimensional_octagonal_pyramidal`
211
- 27. `four_dimensional_nonagonal_pyramidal`
212
- 28. `four_dimensional_decagonal_pyramidal`
213
- 29. `four_dimensional_hendecagonal_pyramidal`
214
- 30. `four_dimensional_dodecagonal_pyramidal`
215
- 31. `k_dimensional_mgonal_pyramidal(k, m) = mgonal_pyramidal_of_the_k_2_th_order(k, m)`
216
- 32. `five_dimensional_mgonal_pyramidal(m)`
217
- 33. `five_dimensional_square_pyramidal`
218
- 34. `five_dimensional_pentagonal_pyramidal`
219
- 35. `five_dimensional_hexagonal_pyramidal`
220
- 36. `five_dimensional_heptagonal_pyramidal`
221
- 37. `five_dimensional_octagonal_pyramidal`
222
- 38. `six_dimensional_mgonal_pyramidal(m)`
223
- 39. `six_dimensional_square_pyramidal`
224
- 40. `six_dimensional_pentagonal_pyramidal`
225
- 41. `six_dimensional_hexagonal_pyramidal`
226
- 42. `six_dimensional_heptagonal_pyramidal`
227
- 43. `six_dimensional_octagonal_pyramidal`
228
- 44. `centered_biquadratic`
229
- 45. `k_dimensional_centered_hypercube(k)`
230
- 46. `five_dimensional_centered_hypercube`
231
- 47. `six_dimensional_centered_hypercube`
232
- 48. `centered_polytope`
233
- 49. `k_dimensional_centered_hypertetrahedron(k)`
234
- 50. `five_dimensional_centered_hypertetrahedron(k)`
235
- 51. `six_dimensional_centered_hypertetrahedron(k)`
236
- 52. `centered_hyperoctahedral = orthoplex`
237
- 53. `nexus(k)`
238
- 54. `k_dimensional_centered_hyperoctahedron(k)`
239
- 55. `five_dimensional_centered_hyperoctahedron`
240
- 56. `six_dimensional_centered_hyperoctahedron`
241
- 57. `generalized_pentatope(left_index = 0)`
242
- 58. `generalized_k_dimensional_hypertetrahedron(k = 5, left_index = 0)`
243
- 59. `generalized_biquadratic(left_index = 0)`
244
- 60. `generalized_k_dimensional_hypercube(k = 5, left_index = 0)`
245
- 61. `generalized_hyperoctahedral(left_index = 0)`
246
- 62. `generalized_k_dimensional_hyperoctahedron(k = 5, left_index = 0) [even or odd dimension only changes sign]`
247
- 63. `generalized_hyperdodecahedral(left_index = 0)`
248
- 64. `generalized_hypericosahedral(left_index = 0)`
249
- 65. `generalized_polyoctahedral(left_index = 0)`
250
- 66. `generalized_k_dimensional_mgonal_pyramidal(k, m, left_index = 0)`
251
- 67. `generalized_k_dimensional_centered_hypercube(k, left_index = 0)`
252
- 68. `generalized_k_dimensional_centered_hypertetrahedron(k, left_index = 0)[provisional symmetry]`
253
- 69. `generalized_k_dimensional_centered_hyperoctahedron(k, left_index = 0)[provisional symmetry]`
254
- 70. `generalized_nexus(k, left_index = 0) [even or odd dimension only changes sign]`
255
-
256
- ### 4. Zoo of figurate-related numbers
257
-
258
- 1. `cuban_numbers = cuban_prime_numbers`
259
- 2. `quartan_numbers [Needs to improve the algorithmic complexity for n > 70]`
260
- 3. `pell_numbers`
261
- 4. `carmichael_numbers [Needs to improve the algorithmic complexity for n > 20]`
262
- 4. `stern_prime_numbers(infty = false) [Quick calculations up to 8 terms]`
263
- 5. `apocalyptic_numbers`
264
-
265
- ### 5. Arithmetic Transformations
266
-
267
- 1. `ArithTransform.n_residue(n, pow, mod)`
268
- 2. `ArithTransform.pc_inversion(n, mod)`
269
- 3. `ArithTransform.padic_val(n, p)`
270
- 4. `ArithTransform.ring_padic_val(seq, p)`
271
- 5. `ArithTransform.padic_norm(n, p)`
272
- 6. `ArithTransform.ring_padic_norm(seq, p)`
273
- 7. `ArithTransform.padic_expansion(n, p, precision = 11, reverse: false)`
274
- 8. `ArithTransform.ring_padic_expansion(seq, p, precision = 11, reverse: false)`