\( \def\pml{{ ‰}} \def\pmf{{ ‰ \phantom.}} \def\pmm{{ ‰ \! ‰}} \def\pmmf{{ ‰ \! ‰ \phantom\%}} \DeclareMathOperator {\arccot} {arccot} \DeclareMathOperator {\arcsec} {arcsec} \DeclareMathOperator {\arccsc} {arccsc} \DeclareMathOperator {\sech} {sech} \DeclareMathOperator {\csch} {csch} \DeclareMathOperator {\arsinh} {arsinh} \DeclareMathOperator {\arcosh} {arcosh} \DeclareMathOperator {\artanh} {artanh} \DeclareMathOperator {\arcoth} {arcoth} \DeclareMathOperator {\arsech} {arsech} \DeclareMathOperator {\arcsch} {arcsch} \)


Expert Tips

To become an expert at solving Integermania-style problems (or to write software to do the same), there are some topics that are worth learning:


There are basically three types of operations you will encounter when playing Integermania. We shall call them binary operations, unary operations, and limited operations.

Binary operations are those mathematical operations which require two inputs to produce a result. All four basic operations of mathematics are binary: addition, subtraction, multiplication, and division. Another common binary operation is exponentiation. Also in this category are nth roots, base-b logarithms, combinations, and permutations.

Unary operations are mathematical operations which use only one input to produce a result. The most common unary operations are factorials, square roots, and percents. Other unary operations include per mille, base 10 logarithms, natural logarithms, trig and inverse trig functions, hyperbolic and inverse hyperbolic functions, the Gamma function, and various sequences.

Limited operations are those operations which, if used, must be done before any binary or unary operation. There are three such operations, each affecting the place value of the digit. They are:

Levels and Surcharges

In order to identify the simplest, most exquisite solutions, each specific operation is assigned a level. They are grouped as follows:

  1. The four basic operations.
  2. The common operations involving place value. These include all three limited operations, plus percents. Although per mille is essentially a place value operation, it is not a common mathematical symbol, so was assigned into the next higher level.
  3. Exponents, radicals, factorials, and per mille.
  4. Basic algebraic functions. These include the logarithmic and exponential functions, trigonometric and inverse trigonometric functions, and hyperbolic and inverse hyperbolic functions. The gamma function was assigned into the next level as it is typically not encountered as early as the algebraic functions of this level.
  5. Some arithmetic operations. The most commonly encountered functions of this category include combinations, permutations, and the gamma function.
  6. Some basic sequence and number theory functions.
  7. Other advanced functions.

Surcharges are added for unary operations, but not for binary operations. The number of binary operations you can have with $n$ digits is exactly $n - 1$, but the number of unary operations that can be used is limitless. Therefore, to recognize that the use of an excessive number of unary operations can lead to very ugly results, a surcharge is applied for each unary operation (even those unary limited operations). The following table illustrates some of the possibilities for creating $6$ from the set $\{1,2,3,4\}$, so that you may see how the levels and surcharges interact:

Level 1.0
$4 + 3 - 2 + 1$
Level 1.2
$-2 + 4 + 3 + 1$
Level 1.4
$\dfrac{(-4) \times (-3)}{2} \times 1$
Level 1.6
$\dfrac{(-4) \times (-3)}{-2 + 1}$
Level 1.8
$\dfrac{(-4) \times (-3)}{-2} \times (-1)$
Level 2.0
$\dfrac{24}{3 + 1}$
Level 2.2
$\dfrac{1}{.2} + 4 - 3$
Level 2.4
$\dfrac{4}{2 \times .\overline{3}} \times 1$
Level 2.6
$\dfrac{.4 - .3}{2\%} + 1$
Level 2.8
$\dfrac{.4 \times .1}{2 \times .\overline{3}}$
Level 3.0
$3^2 - 4 + 1$
Level 3.2
$2^3 - 1 \times \sqrt{4}$
Level 3.4
$\dfrac{4!}{3!} + \sqrt[1]{2}$
Level 3.6
$\dfrac{(4 + 1^3 )!\pmf}{2\%}$
Level 3.8
$\dfrac{4^1 \%}{2 \times .\overline{3}\%}$
Level 4.0
$3 + 1 + \log_2(4)$
Level 4.2
$\dfrac{4 \times 3}{2} + \log(1)$
Level 4.4
$\cot\arctan \left(\dfrac{1 \times 2}{3 \times 4}\right)$
Level 4.6
$\dfrac{4 \times 1}{\tanh\ln\sqrt{3}} - 2$
Level 4.8
$\dfrac{3 \times 1}{\sinh\ln 2 - \cot\arctan 4}$
Level 5.0
$1^3 \times {}_4 C_2$
Level 5.2
$(3 - 2 \times 1) \times \Gamma(4)$
Level 5.4
$\dfrac{-\log(1\%\%\%)}{\dfrac{3!}{2} - \sqrt{4}}$
Level 5.6
${}_4 P_2 - 3! \times \cot\arctan 1$
Level 5.8
$\dfrac{\ln\sqrt{\exp 24}}{\Gamma(3)} \times 1$

Integers are always exact values, and the use of rounding indicates a certain sloppiness in obtaining a result. If through unary operations on a single digit, the number $1$ is obtainable, then every positive integer is obtainable by the formula $n = -\log\sqrt{1\%\%...\%}$, using $n$ percent signs. Therefore, rounding is really unnecessary, and heavily discouraged by additional surcharges.

On this site, the best solutions (at the lowest level) are sought.

Repeating Decimals

A rational number is a number that can be written as a quotient of two integers. In decimal form, every rational number either terminates or eventually has an eternally repeating group of digits. Any decimal which neither terminates nor eternally repeats is an irrational number.

Being able to convert a repeating decimal to fraction form, or vice versa, is useful. A single digit with a repeating bar is always ninths, as, for example:

With multiple digits behind the decimal point, and possibly multiple digits under the bar, the results are slightly more involved, but really quite similar. Here are a few examples.

Percent and Per Mille

The percent sign, $\%$, means "out of 100", and the per mille sign, $\pml$, means "out of 1000". Both are very useful in creating larger integers. Percent is a level 2 unary operation, while per mille is a level 3 unary operation.

Although $\dfrac74 = 1.75$ may not seem useful since the result is not an integer, every fraction will give rise to a whole sequence of values. If the fraction produced a terminating decimal, then larger integers can also be obtained. Consider the following related values:

Note that division by repeating decimals will also generate a sequence of solutions.

If division is used on quantities that already involve other operations, more creativity might be needed. For example, $\dfrac{7!}{\sqrt{4}} = 2520$. This gives rise to a sequence of values both larger and smaller:

Note how the use of both percent and per mille in the same fraction allowed us to multiply or divide a result by 10. This may not be possible with a decimal point alone, when other operations have occurred in the numerator or denominator, as the decimal point is a limited operation.

Square and nth Roots

A square root, such as $\sqrt{5}$, is a special case of an nth root, $\sqrt[2]{5}$. The index $2$ indicates that if the root is raised to the second power (i.e., squared), the value underneath the radical sign will result. Square roots can be written with or without the index; they are unary operations when written without an index, and binary when written with the index. Other roots always require an explicit index. Both square roots and nth roots are level 3 operations.

The most useful square roots are:

The most useful specific nth root is probably:

Some general nth root rules are worth noting:


The factorial of the integer $x$ is written $x!$. It is defined to be the product of all of the integers from $1$ to $x$ inclusive. In other words: $x! = (x)(x-1)(x-2)...(3)(2)(1)$. Factorials are not defined for non-integers (in spite of some calculators computing them, what they are actually giving you is related to a gamma function). The factorial is a level 3 unary operation.

Factorials are very useful in finding Integermania solutions. Those factorials involving single digits include:

For some factorial computations, percents can also be useful. For example:

After $1! = 1$, factorials are never perfect squares, but a few of them come close. They give rise to the following potentially useful results:

A word of caution, the expression $x!!$ is actually different than $(x!)!$. The first is a "double factorial", which is a level 7 operation. The second is the factorial of a factorial, a pair of level 3 operations, which we used above when we gave the example $(3!)! = 720$.

Some Strategies

If you want to become an Integermania expert, you will need to go beyond randomly selecting some operations and seeing what occurs. Here are some strategies, and for each of our examples, we will assume that our initial set of digits is $\{3, 4, 6, 7\}$.

Negative Exponents

Mathematically, the use of negative exponents is another form of division by decimals, but there is no explicitly written numerator. As exponents, these are still level 3 operations. Although we would not normally write $(.5)^{-3} = 8$ because $5 + 3 = 8$ is at a better level, it does give rise to the following sequence of solutions:


Logarithms are level 4 operations, and can be either binary or unary, depending on whether the base is explicitly stated or not. Of those that are binary operations involving single digits, the most useful are probably

Using a unary logarithm, we offer the first few terms of the following very useful infinite sequence:

Although $\log(1) = 0$ may appear useful in ridding yourself of an unwanted $1$, most likely multiplying by $1$ will achieve the same result.

Natural logarithms can also be used with the exponential function to obtain some special results:

Trigonometric Functions

All of the trigonometric functions are level 4 operations. Since some calculators do not have some of the six standard trigonometric functions built in, it is hoped that you are familiar with the following identities:

In the mathematical world, trigonometric functions are assumed to use radians, unless degrees are explicitly stated. Therefore, $\sin(30) = -0.9880316...$, but $\sin(30^{\circ}) = 0.5$. In a sense, the symbol ${}^{\circ}$ is acting like the conversion factor $\dfrac{\pi}{180}$.

If $\pi$ is not a permitted "digit", nice rational results will typically need the use of degree measure, and then probably using multiples of $30^{\circ}$ or $45^{\circ}$. Here are some examples:

Inverse Trigonometric Functions

The inverse trigonometric functions are also level 4 operations. They are trickier to define, because the domain of the trig function has to be restricted before a unique inverse can be obtained. For three of the inverse trig functions, $\arcsin x$, $\arccos x$, and $\arctan x$, there is common agreement on the restriction. For the other three, disagreement exists, which affects the range of each of the functions, although first quadrant results are never affected. We shall use those definitions that satisfy the following identities:

To convert the radian measure result of an inverse trig function to degree measure, you typically divide by the conversion factor $\dfrac{\pi}{180}$. Without a $\pi$, a ratio can be used. For example:

The composition of a trig function and an inverse trig function can create many new possibilities. Some special results include:

Here are some other useful general formulas. These may produce rational results when $x$ is the ratio of two values from a Pythagorean triple.

They give rise to the following (incomplete) list of results:

For producing a particular value, the following results may be useful:

Hyperbolic Functions

All of the hyperbolic and inverse hyperbolic functions are level 4 operations. Not as well known as the trig functions, they are in some respects similar to them. The definitions of the two basic hyperbolic functions are:

The other four hyperbolic functions are related to these two original functions in the same way that the other four trig functions are related to sine and cosine:

By themselves these functions would not produce many useful results. But combined with a natural logarithm, integer input will produce rational values.

The integer solutions from these formulas most often involve $\coth\ln\sqrt{x}$, and they include:

Additionally, the following results are certainly interesting, and may also be useful:

Inverse Hyperbolic Functions

Just as the hyperbolic functions were defined in terms of exponential functions, the inverse hyperbolic functions are found to be related to the natural logarithm functions. They are also level 4 operations.

With the formulas above, we would not expect many integer results, or even rational results, for any nonzero inputs. But a composition of these functions with the exponential function can give some usable results.

From these, we learn that:

Given that we had so much success with $\coth\ln\sqrt{x}$, we would probably expect great things from its inverse, which is $\left(\exp\arcoth x\right)^2 = \dfrac{x + 1}{x - 1} = \coth\ln\sqrt{x}$. In other words, $\coth\ln\sqrt{x}$ is its own inverse, which puts us in the paradoxical position that inverses of a very useful function will not be very useful!