Composite Number

DOWNLOAD Mathematica Notebook

A composite number n is a positive integer n>1 which is not prime (i.e., which has factors other than 1 and itself). The first few composite numbers (sometimes called "composites" for short) are 4, 6, 8, 9, 10, 12, 14, 15, 16, ... (OEIS A002808), whose prime decompositions are summarized in the following table. Note that the number 1 is a special case which is considered to be neither composite nor prime.

nprime factorizationnprime factorization
42^2202^25
62·3213·7
82^3222·11
93^2242^3·3
102·5255^2
122^23262·13
142·7273^3
153·5282^27
162^4302·3·5
182·3^2322^5

The nth composite number c_n can be generated using the Wolfram Language code

  Composite[n_Integer] :=
    FixedPoint[n + PrimePi[#] + 1&, n]

The Dirichlet generating function of the characteristic function of the composite numbers c_n is given by

sum_(n=1)^(infty)([n in {c_k}_(k=1)^infty])/(n^s)=sum_(n=1)^(infty)1/(c_n^s)
(1)
=1/(4^s)+1/(6^s)+1/(8^s)+1/(9^s)+...
(2)
=zeta(s)-1-P(s),
(3)

where zeta(s) is the Riemann zeta function, P(s) is the prime zeta function, and [S] is an Iverson bracket.

There are an infinite number of composite numbers.

The composite number problem asks if there exist positive integers m and n such that N=mn.

A composite number C can always be written as a product in at least two ways (since 1·C is always possible). Call these two products

 C=ab=cd,
(4)

then it is obviously the case that c|ab (c divides ab). Set

 c=mn,
(5)

where m is the part of c which divides a, and n is the part of c which divides b. Then there are p and q such that

a=mp
(6)
b=nq.
(7)

Solving ab=cd for d gives

 d=(ab)/c=((mp)(nq))/(mn)=pq.
(8)

It then follows that

S=a^2+b^2+c^2+d^2
(9)
=m^2p^2+n^2q^2+m^2n^2+p^2q^2
(10)
=(m^2+q^2)(n^2+p^2).
(11)

It therefore follows that a^2+b^2+c^2+d^2 is never prime! In fact, the more general result that

 S=a^k+b^k+c^k+d^k
(12)

is never prime for k an integer >=0 also holds (Honsberger 1991).

Wolfram Web Resources

Mathematica »

The #1 tool for creating Demonstrations and anything technical.

Wolfram|Alpha »

Explore anything with the first computational knowledge engine.

Wolfram Demonstrations Project »

Explore thousands of free applications across science, mathematics, engineering, technology, business, art, finance, social sciences, and more.

Computerbasedmath.org »

Join the initiative for modernizing math education.

Online Integral Calculator »

Solve integrals with Wolfram|Alpha.

Step-by-step Solutions »

Walk through homework problems step-by-step from beginning to end. Hints help you try the next step on your own.

Wolfram Problem Generator »

Unlimited random practice problems and answers with built-in Step-by-step solutions. Practice online or make a printable study sheet.

Wolfram Education Portal »

Collection of teaching and learning tools built by Wolfram education experts: dynamic textbook, lesson plans, widgets, interactive Demonstrations, and more.

Wolfram Language »

Knowledge-based programming for everyone.