Integer Complexity

DOWNLOAD Mathematica Notebook ComplexityNumber

The complexity c_n of an integer n is the least number of 1s needed to represent it using only additions, multiplications, and parentheses. For example, the numbers 1 through 10 can be minimally represented as

1=1
(1)
2=1+1
(2)
3=1+1+1
(3)
4=(1+1)(1+1)
(4)
=1+1+1+1
(5)
5=(1+1)(1+1)+1
(6)
=1+1+1+1+1
(7)
6=(1+1)(1+1+1)
(8)
7=(1+1)(1+1+1)+1
(9)
8=(1+1)(1+1)(1+1)
(10)
9=(1+1+1)(1+1+1)
(11)
10=(1+1+1)(1+1+1)+1
(12)
=(1+1)(1+1+1+1+1),
(13)

so the complexities for n=1, 2, ..., are 1, 2, 3, 4, 5, 5, 6, 6, 6, 7, 8, 7, 8, ... (OEIS A005245).

The smallest numbers of complexity n=1, 2, ... are 1, 2, 3, 4, 5, 7, 10, 11, 17, 22, 23, 41, ... (OEIS A005520).

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.