Triangular numbers: Difference between revisions

Content added Content deleted
m (→‎{{header|Raku}}: reformat slightly)
m (Add another test value)
Line 55: Line 55:
* Find and display the first 30 12-simplex numbers ('''r''' = 12).
* Find and display the first 30 12-simplex numbers ('''r''' = 12).
* Find and display the triangular root, the tetrahedral root, and the pentatopic root for the integers:
* Find and display the triangular root, the tetrahedral root, and the pentatopic root for the integers:
** 7140
** 21408696
** 21408696
** 26728085384
** 26728085384
Line 100: Line 101:
say '';
say '';


for 21408696, 26728085384, 14545501785001 {
for 7140, 21408696, 26728085384, 14545501785001 {
say qq:to/R/;
say qq:to/R/;
Roots of $_:
Roots of $_:
Line 136: Line 137:
51895935 86493225 141120525 225792840 354817320 548354040
51895935 86493225 141120525 225792840 354817320 548354040
834451800 1251677700 1852482996 2707475148 3910797436 5586853480
834451800 1251677700 1852482996 2707475148 3910797436 5586853480

Roots of 7140:
triangular-root: 119
tetrahedral-root: 34
pentatopic-root: 18.876646615928006607901783


Roots of 21408696:
Roots of 21408696: