factors

get list of factors for given integer


Parameters

factors number :integer

Attributes

primeprime factorization

Returns

  • :block

Examples

copy
factors 16 ; => [1 2 4 8 16]

copy
factors.prime 48 ; => [2 2 2 2 3] unique factors.prime 48 ; => [2 3] factors.prime 18446744073709551615123120 ; => [2 2 2 2 3 5 61 141529 26970107 330103811]

Related