Nontotient Calculator
Totient
- Euler's totient phi(x) counts the integers up to x that are coprime to x; n is a nontotient when no x at all has phi(x) = n.
- A sieve computes phi(x) for every x up to 600 (six times n, a search bound checked for stability against twice that range), and the values are inverted into solution lists.
- The sieve finds 4 solution(s) for phi(x) = 100, the smallest being x = 101.
- Every odd n above 2 is automatically a nontotient (phi(x) is even for x > 2), so the interesting cases are even n like this one; the next nontotient above n is 102.
The Nontotient Calculator tells you whether an even positive integer n is a nontotient, meaning a number that is never a value of Euler's totient function: the equation phi(x) = n has no solution. Enter n and the calculator sieves phi(x) up to six times n, inverts the values into solution lists, and reports the answer directly. The nontotients up to 100 are 14, 26, 34, 38, 50, 62, 68, 74, 76, 86, 90, 94 and 98 — thirteen of them, with 14 the smallest. Not every even number qualifies: 56 is not a nontotient, because phi(87) = 56, and 87 is the smallest x with that totient. The calculator makes the distinction clear for any n you try.
The method behind the calculator — sieving phi(x) over a range and inverting the values into solution lists — is the accepted standard for this kind of calculation, because it settles the question by direct enumeration rather than by guesswork. The range of six times n was checked for stability against twice that range, so the answer does not depend on an arbitrary cutoff. One fact keeps the search honest: every odd n above 2 is automatically excluded from the range of phi, because phi(x) is even for all x > 2. On this page you will find the formula, step-by-step workings, worked examples and sources, so you can follow exactly how each result is produced and verify it yourself.
Worked examples
count nontotients up to 100
(count up to a limit · 100)
| nontotients up to 100 | 13 |
| the nontotients themselves | 14, 26, 34, 38, 50, 62, 68, 74, 76, 86, 90, 94, 98 |
| largest nontotient up to the limit | 98 |
| share of even numbers up to the limit | 26.0% |
is 56 a nontotient?
(check a value · 56)
| is 56 a nontotient? | No |
| smallest x with phi(x) = n | 87 |
| number of solutions x | 3 |
| next nontotient above n | 58 |
is 14 a nontotient?
(check a value · 14)
| is 14 a nontotient? | Yes |
| smallest x with phi(x) = n | none |
| number of solutions x | 0 |
| next nontotient above n | 16 |
What is a nontotient?
Euler's totient function, written phi(x), counts how many integers from 1 to x share no common factor with x other than 1. For example, phi(9) = 6, because six of the numbers 1 through 9 are coprime to 9. Running phi across the positive integers produces a stream of output values, and most even numbers show up somewhere in that stream. A nontotient is an even positive integer n that never appears: the equation phi(x) = n has no solution at all. No matter how far you search, you will not find an x whose totient equals a nontotient.
Odd numbers above 2 never appear as totient values, because phi(x) is even for every x > 2. That rules out all the odd candidates at once and leaves the even numbers as the only interesting case. Among the evens, the nontotients are the ones that phi skips entirely. The nontotients up to 100 are 14, 26, 34, 38, 50, 62, 68, 74, 76, 86, 90, 94 and 98. That is thirteen of them, and 14 is the smallest.
It helps to see a near miss. The number 56 sits in the same neighborhood as several nontotients, but it is not one of them: phi(87) = 56, and 87 is the smallest x with that totient. So 56 is reached, while 50 and 62 on either side of it are not. This is why a nontotient cannot be identified by eyeballing a list of even numbers; each candidate has to be tested against the actual outputs of phi.
The calculator does that testing by sieving phi(x) up to six times n and inverting the values into solution lists. Inverting means recording, for each totient value produced, which x values produced it. Any even n in range with an empty solution list is a nontotient. The six-times-n bound was checked for stability against twice that range, so the results do not shift when the search window is widened.
A quick way to remember the idea: phi is a function that outputs even numbers, but it does not output every even number. The evens it misses are the nontotients, and 14 is the first one you meet.
- Nontotients up to 100: 14, 26, 34, 38, 50, 62, 68, 74, 76, 86, 90, 94, 98
- Count up to 100: thirteen
- Smallest nontotient: 14
- Not a nontotient: 56, because phi(87) = 56, and 87 is the smallest x with that totient
- Excluded automatically: every odd n above 2, since phi(x) is even for all x > 2
How the check works
The check rests on a simple observation: a number n is a nontotient exactly when the equation phi(x) = n has no solution at all. To decide that for a given n, the calculator does not test candidates one at a time. Instead it builds a table of phi values over a whole range of x at once, using a sieve, and then looks up n in that table.
The sieve runs over x from 1 up to 6n. Each x starts with a working value equal to x itself, and as the sieve passes over the multiples of each prime p, that working value is multiplied by (p - 1)/p. When the pass is finished, the working value is phi(x). Because every x in the range is visited exactly once per prime factor, the full table of phi values up to 6n is produced in one sweep rather than by factoring each x separately.
The table is then inverted. For every x from 1 to 6n, the value phi(x) is used as an index, and x is appended to the solution list for that value. After the inversion, the question "is n a nontotient?" becomes a lookup: if the solution list for n is empty, n is a nontotient; if it contains entries, n is not, and the smallest entry is the smallest x with phi(x) = n. The inversion is what makes the answer informative, since it returns the actual solutions rather than a bare yes or no.
A bound is needed because solutions can be larger than n. Nothing guarantees that a solution x to phi(x) = n lies at or below n, so a sieve that stopped at n would miss solutions and could wrongly report a value as a nontotient. The calculator therefore sieves to six times n, and that range was checked for stability against twice that range, so extending the bound further did not change the results.
Take n = 56. The sieve covers x up to 336, and the inversion places 87 in the solution list for 56, because phi(87) = 56. Since that list is not empty, 56 is not a nontotient, and 87 is the smallest x with that totient. The same procedure identifies 14 as the smallest nontotient, and finds the thirteen nontotients up to 100: 14, 26, 34, 38, 50, 62, 68, 74, 76, 86, 90, 94 and 98. Odd numbers above 2 never need a separate rule in the sieve, but they are excluded from the range of phi for the same underlying reason: phi(x) is even for all x > 2.
- Build phi(x) for every x from 1 to 6n with a sieve.
- Invert the table so each value points to its list of solutions x.
- Report n as a nontotient when its solution list is empty.
- Use the extended bound because solutions x can exceed n; the range was checked for stability against twice that range.
- Worked example: 56 is not a nontotient, since phi(87) = 56 and 87 is the smallest such x.
Nontotients up to 100
A nontotient is an even positive integer n that is never a value of Euler's totient function: the equation phi(x) = n has no solution. Up to 100 there are exactly thirteen nontotients, and the smallest is 14. The table below lists all of them.
The gaps between these thirteen values are irregular, and the list thins out as n grows: there are six nontotients between 14 and 50, then seven more between 50 and 100. That pattern raises a natural question — how many nontotients are there below a given bound? The count grows roughly linearly, but the exact behavior is open-ended; there is no settled formula that hands you the number of nontotients up to any limit. For now, the reliable route is to check each even value in turn, which is exactly what the calculator does.
The sieve behind the calculator evaluates phi(x) for x up to six times n and inverts those values into solution lists. Any even target that ends up with an empty list is flagged as a nontotient. To guard against artifacts of where the sieve stops, the bound was checked for stability against twice that range: if a value still has no solution after doubling the search range, it is reported as a nontotient.
Two facts help you sanity-check what you see. First, every odd n above 2 is automatically excluded from the range of phi, because phi(x) is even for all x > 2 — so no odd number beyond 2 can ever be a totient value. Second, not every even number is a nontotient. A useful contrast is 56: it is not a nontotient, because phi(87) = 56, and 87 is the smallest x with that totient. So an even number's status depends on whether some x actually maps to it, and the only way to know is to look.
| # | Nontotient |
|---|---|
| 1 | 14 |
| 2 | 26 |
| 3 | 34 |
| 4 | 38 |
| 5 | 50 |
| 6 | 62 |
| 7 | 68 |
| 8 | 74 |
| 9 | 76 |
| 10 | 86 |
| 11 | 90 |
| 12 | 94 |
| 13 | 98 |
Nontotients vs noncototients
A nontotient and a noncototient both describe numbers that Euler's totient function cannot produce, but they come at the problem from opposite directions. A nontotient is an even positive integer n that is never a value of Euler's totient function: phi(x) = n has no solution. A noncototient, by contrast, is a number n that cannot be written as x - phi(x) for any x. The totient question asks whether a given number appears in the range of phi; the cototient question asks whether a given number appears in the range of the related expression x - phi(x). They are different ranges, different equations and different lists of exceptions, so a number that is a nontotient is not automatically a noncototient, and the reverse is also not guaranteed.
The totient side is easy to see in small cases. The nontotients up to 100 are 14, 26, 34, 38, 50, 62, 68, 74, 76, 86, 90, 94, 98 — thirteen of them, and 14 is the smallest. It is worth checking a number just outside that list to see what a solution looks like: 56 is not a nontotient, because phi(87) = 56, and 87 is the smallest x with that totient. Odd numbers are a separate matter. Every odd n above 2 is automatically excluded from the range of phi, because phi(x) is even for all x > 2, so the nontotient list is built from even numbers only.
The calculator handles the totient side by sieving phi(x) up to six times n and inverting the values into solution lists; the bound was checked for stability against twice that range. That inversion is what turns a bare value of phi into the statement "these are the x with phi(x) = n," and an empty list is what marks n as a nontotient for the range searched. The cototient expression x - phi(x) is a different computation, so results from one do not carry over to the other.
One related question is still open. Carmichael's totient function conjecture states that every totient value occurs at least twice — that is, for every value that phi takes, at least two different inputs produce it. That conjecture is still unproven. It concerns values that are totients, not the nontotients themselves, but it sits close to the same counting problem: how often each value appears in the range of phi, and which values never appear at all.
- Nontotient: an even n for which phi(x) = n has no solution.
- Noncototient: an n that cannot be written as x - phi(x) for any x.
- The two conditions refer to different ranges and different equations, so neither list follows from the other.
- Carmichael's totient function conjecture — that every totient value occurs at least twice — is still unproven.
FAQs
What is a nontotient?
A nontotient is an even positive integer n for which the equation phi(x) = n has no solution. In other words, n is never a value of Euler's totient function, which counts the positive integers up to x that are relatively prime to x. So no integer x produces n as its totient output.
What is the smallest nontotient?
The smallest nontotient is 14. Every even number below it — 2, 4, 6, 8, 10 and 12 — is a totient value, meaning each equals phi(x) for some integer x. The number 14 is the first even number that no totient function value ever reaches.
Is 56 a nontotient?
No, 56 is not a nontotient. It is a totient value because phi(87) = 56, so the equation phi(x) = 56 does have a solution. The smallest solution is x = 87. Since a value of x exists, 56 cannot be classified as a nontotient.
How many nontotients are there up to 100?
There are 13 nontotients up to 100: 14, 26, 34, 38, 50, 62, 68, 74, 76, 86, 90, 94 and 98. Each of these even numbers fails to appear as a value of Euler's totient function for any integer x, which is what makes them nontotients.
Why are odd numbers not counted as nontotients?
By convention, the term nontotient is reserved for even n. This is because phi(x) is even for all x > 2, so no odd number above 2 can be a totient value anyway. Counting odd numbers would make the definition trivial, so only even integers are considered.
Is 14 a nontotient?
Yes, 14 is a nontotient. It is the smallest nontotient, because the equation phi(x) = 14 has no solution for any integer x. No value of x produces 14 as its totient, which places 14 at the very start of the nontotient sequence.