Determine whether a number is composite and show its smallest factor.
A composite number is a positive integer greater than 1 that has at least one positive divisor other than 1 and itself. In other words, it is not prime. The number 1 is special: it is defined as neither prime nor composite. Every composite number can be expressed as a product of primes (the Fundamental Theorem of Arithmetic).
Composite definition
n is composite if there exists d where 1 < d < n and d | n
No. By mathematical convention, 1 is neither prime nor composite. The classification starts at 2.
A prime has exactly two distinct positive divisors (1 and itself). A composite has more than two — meaning it can be divided evenly by at least one number other than 1 and itself.