Anonymous user
Aliquot sequence classifications: Difference between revisions
m
→{{header|REXX}}: changed title for 1st section, increased title width.
(→{{header|Wren}}: Now uses Wren-seq module.) |
m (→{{header|REXX}}: changed title for 1st section, increased title width.) |
||
Line 2,937:
numeric digits 100 /*be able to compute the number: BIG */
big= 2**47; NTlimit= 16 + 1 /*limits for a non─terminating sequence*/
numeric digits max(9,
digs= digits() /*used for align numbers for the output*/
#.= .; #.0= 0; #.1= 0 /*#. are the proper divisor sums. */
say center('numbers from ' low "
do n=low to high; call classify n /*call a subroutine to classify number.*/
end /*n*/ /* [↑] process a range of integers. */
say
say center('first numbers for each classification',
class.= 0 /* [↓] ensure one number of each class*/
do q=1 until class.sociable\==0 /*the only one that has to be counted. */
Line 2,953:
end /*q*/ /* [↑] only display the 1st occurrence*/
say /* [↑] process until all classes found*/
say center('classifications for specific numbers',
do i=1 for words($L) /*$L: is a list of "special numbers".*/
call classify word($L, i) /*call a subroutine to classify number.*/
Line 2,998:
<pre style="font-size:75%">
═══════════════════════════════════════════════numbers from 1 ───► 10 (inclusive)════════════════════════════════════════════════
1 is terminating 0
2 is terminating 1 0
3 is terminating 1 0
Line 3,010:
10 is terminating 8 7 1 0
════════════════════════════════════════════════first numbers for each classification════════════════════════════════════════════════
1 is terminating 0
6 is perfect 6
25 is aspiring 6
138 is
220 is amicable 284 220
562 is cyclic 284 220 284
12496 is sociable 14288 15472 14536 14264 12496
════════════════════════════════════════════════classifications for specific numbers═════════════════════════════════════════════════
11 is terminating 1 0
12 is terminating 16 15 9 4 3 1 0
Line 3,032:
562 is cyclic 284 220 284
1064 is cyclic 1336 1184 1210 1184
1488 is
15355717786080 is
</pre>
|