Prime Factorization With factor

Break integers into their prime factors with a tiny coreutils command.

LinuxTerminalscriptingLow risk
Run factor 3600 to print 3600 followed by its prime factors.

01Command

Command
$ factor 3600

02What it does

factor accepts one or more integers (or a stream on standard input) and prints each number with its prime factorization. It uses Pollard rho and is very fast on moderately large numbers, which makes it handy for quick math checks and scripting.

03Risk

RiskLow risk
RequirementsGNU coreutils (preinstalled on Linux)
!Warning: Very large inputs can be slow or infeasible to factor; there is no timeout built in.

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

  • GNU coreutils: factor
    GNU · vendor-doc · 2026-09-20
    Evidence: Documents factor, which prints the prime factors of each integer argument.
  • Debian package: coreutils
    Debian · vendor-doc · 2026-09-20
    Evidence: Debian packages the GNU coreutils suite, which provides this command.

Last verified: 2026-09-20 · Category: Developer

06Related solutions