Anonymous user
Factors of an integer: Difference between revisions
→{{header|J}}: Rm extra whitespace
m (→{{header|J}}) |
(→{{header|J}}: Rm extra whitespace) |
||
Line 42:
J has a primitive, q: which returns its prime factors.
2 2 2 5</lang>
Alternatively, q: can produce provide a table of the exponents of the unique relevant prime factors
2 5
3 1</lang>
Line 53:
With this, we can form lists of each of the potential relevant powers of each of these prime factors
┌───────┬───┐
│1 2 4 8│1 5│
Line 60:
From here, it's a simple matter to compute all possible factors of the original number
1 5
2 10
|