Wasteful Number Calculator
Digits
- Factor 36 = 2^2 x 3^2, writing exponents where a prime repeats.
- Count digits on both sides: the number itself has 2 digits, its written factorization has 4, exponents included.
- The factorization is longer than the number, so the number is wasteful - factoring it costs more digits than writing it.
- The three classes partition the integers: frugal (factorization shorter), equidigital (equal - every prime, for instance), and wasteful (longer).
Writing a number plainly costs digits. Writing it as a prime factorization can cost fewer digits - or more. A wasteful number is one whose factorization, written with exponents, uses strictly more digits than the number itself. The model case is 36: it has 2 digits, but its factorization 2^2 x 3^2 uses 4 digits (the primes 2 and 3 plus their two exponents), so 36 is wasteful.
This calculator performs both counts for your number and classifies it into the three classes that partition the integers: frugal (factorization uses fewer digits), equidigital (equal - every prime is equidigital, since its factorization is itself), and wasteful (more). The counterintuitive anchor is 125: its factorization 5^3 uses just 2 digits - the prime 5 and the exponent 3 - against the number's own 3 digits, so 125 is frugal, not wasteful. Big exponents compress; many small factors sprawl.
In list mode the calculator enumerates the wasteful numbers up to your limit. Up to 50 there are exactly 24: 4, 6, 8, 9, 12, 18, 20, 22, 24, 26, 28, 30, 33, 34, 36, 38, 39, 40, 42, 44, 45, 46, 48 and 50.
Worked examples
Is 36 wasteful?
(0 - test a single number · 36)
| is 36 a wasteful number? | Yes - its factorization uses 4 digits against the number's own 2 |
| prime factorization | 2^2 x 3^2 |
| digits in n | 2 |
| digits in the factorization (exponents counted) | 4 |
Is 125 wasteful?
(0 - test a single number · 125)
| is 125 a wasteful number? | No - it is frugal: its factorization uses 2 digits against the number's own 3 |
| prime factorization | 5^3 |
| digits in n | 3 |
| digits in the factorization (exponents counted) | 2 |
Wasteful numbers up to 50
(1 - list up to a limit · 50)
| wasteful numbers up to 50 | 4, 6, 8, 9, 12, 18, 20, 22, 24, 26, 28, 30, 33, 34, 36, 38, 39, 40, 42, 44, 45, 46, 48, 50 |
| how many there are | 24 |
| largest of them | 50 |
| the other two classes | frugal (shorter factorization) and equidigital (equal) |
The digit-count rule
The rule has no hidden parts. Write n in decimal and count its digits. Then write the prime factorization of n with exponents (2^2 x 3^2, not 2 x 2 x 3 x 3), and count the digits used by the primes and the exponents together - a prime appearing to the first power contributes just its own digits, and an exponent contributes its digits when it is greater than 1. Compare the two counts: strictly more for the factorization means wasteful; fewer means frugal; equal means equidigital.
Work the model case by hand: 36 = 2^2 x 3^2. The factorization's digits are '2', '2', '3', '2' - four digits. The number's own count is two. Four beats two, so 36 is wasteful. Now 125 = 5^3: digits '5' and '3' - two, against three for the number itself. The factorization is shorter, so 125 is frugal. The calculator shows both counts and the factorization for every input, so each verdict can be audited digit by digit.
- 36 = 2^2 x 3^2: 4 factorization digits vs 2 - wasteful
- 125 = 5^3: 2 factorization digits vs 3 - frugal
- Primes are equidigital: the factorization is the number itself
- Exponents count only when greater than 1
The wasteful numbers up to 50
The complete list to 50 is: 4, 6, 8, 9, 12, 18, 20, 22, 24, 26, 28, 30, 33, 34, 36, 38, 39, 40, 42, 44, 45, 46, 48, 50 - twenty-four numbers. Read the pattern: they are small composites built from several small prime factors or small exponents. 4 = 2^2 already qualifies (2 digits against 1), and every even semiprime like 22 = 2 x 11 or 33 = 3 x 11 appears, because two prime factors written out cost at least 3 digits against the number's 2.
Equally instructive are the absentees. 16 = 2^4 uses 2 digits against 2 - equidigital, not wasteful. 27 = 3^3 and 25 = 5^2 are equidigital the same way. 32 = 2^5 likewise. A prime power with a one-digit prime and a one-digit exponent always lands at exactly 2 factorization digits - wasteful against a one-digit number like 4, equidigital against two-digit numbers like 16, 25 and 27. The wasteful class is fed by factor count, not by exponent size.
| n | Factorization | Digits in n | Digits in factorization | Class |
|---|---|---|---|---|
| 4 | 2^2 | 1 | 2 | Wasteful |
| 12 | 2^2 x 3 | 2 | 3 | Wasteful |
| 16 | 2^4 | 2 | 2 | Equidigital |
| 36 | 2^2 x 3^2 | 2 | 4 | Wasteful |
| 125 | 5^3 | 3 | 2 | Frugal |
Why small factors sprawl and big exponents compress
The classification is a tug-of-war between two effects. Each distinct prime factor costs at least one digit plus separator-free space in the count, and small numbers have few digits of their own to spend - a two-digit number whose factorization names three or four digits loses immediately. That is why the wasteful list is dense at the small end: 24 of the first 50 integers are wasteful.
Exponents pull the other way. A prime power p^k costs digits(p) + digits(k) no matter how large the value grows, so 5^3 = 125 compresses 3 digits into 2, and larger powers compress harder: by the time a number is a high power, its factorization is dramatically shorter than the number. Frugal numbers are rare among small integers and common among prime powers - the two regimes meet in the equidigital boundary cases like 16, 25 and 27.
- 24 of the integers up to 50 are wasteful - the class is dense at the small end
- Each extra prime factor costs digits; each exponent is nearly free
- Prime powers compress: 125 = 5^3 needs 2 digits for a 3-digit number
The three classes
Frugal, equidigital and wasteful partition the integers: every n falls into exactly one class, by comparing the two digit counts. Primes are the canonical equidigital examples - their factorization is themselves, digit for digit. The number 1 is the degenerate case (empty factorization), conventionally left unclassified or counted with the equidigital side; the calculator's list mode starts at 2.
The terminology varies slightly in the literature - 'economical' is used for frugal in some sources, and digit counts in other bases produce sibling classifications - but with the base-10, exponents-counted rule stated here, the classes and the list to 50 are exactly as tabulated on this page. When comparing with a reference, check its rule on 36 and 125: a reference matching this page calls 36 wasteful and 125 frugal.
One more boundary case sharpens the rule: squares of two-digit primes, like 121 = 11^2, pay digits(11) + digits(2) = 3 against the number's 3 digits - equidigital, not wasteful. And the cube of a one-digit prime, like 125 = 5^3, is frugal, as this page's audit shows. The wasteful class is therefore fed almost entirely by numbers with several prime factors or with exponents on one-digit numbers - a profile the list up to 50 displays at a glance: every one of its 24 members is either a small prime power (4, 8, 9) or has at least two distinct prime factors.
Density: how common is each class?
Among small numbers the wasteful class dominates - 24 of the first 50 integers - because small numbers have few digits to spend and factorizations sprawl. As numbers grow, the balance shifts: a random large integer has about log log n prime factors, whose total digit cost grows much more slowly than the digits of n itself, so large numbers are typically frugal or equidigital, and wasteful numbers become the minority. The crossover is a digit-economics effect, not a deep theorem: digit counts are logarithmic in size, and the factorization of a typical number is short.
The extremes make the point. A product of many small distinct primes - 2 x 3 x 5 x 7 x 11 x 13 = 30030 - pays, by this page's counting rule, 1+1+1+1+2+2 = 8 factorization digits against the number's own 5 digits, so 30030 is wasteful despite its size. Primorial-style numbers stay wasteful unusually long, because they maximize factor count per digit - the exception that maps the rule's boundary.
- 24 of the first 50 integers are wasteful; the share falls as numbers grow
- Typical large numbers are frugal - few prime factors, many digits
- Primorial-style numbers (30030 = 2 x 3 x 5 x 7 x 11 x 13) stay wasteful longest
Checking a claim by hand
The classification invites hand verification, and two habits keep it honest. First, always write the factorization with exponents before counting - 36 counted as 2 x 2 x 3 x 3 gives 4 digits too, but for the wrong reason, and at 64 the two methods diverge (2^6: 2 digits by the rule, against 6 written out). Second, count the number's own digits from its decimal form, not from its size - 100 has 3 digits, and its factorization 2^2 x 5^2 has 4, making 100 wasteful, a verdict intuition often misses.
With those habits, the page's table can be audited line by line: 4 (2 vs 1, wasteful), 12 (3 vs 2, wasteful), 16 (2 vs 2, equidigital), 36 (4 vs 2, wasteful), 125 (2 vs 3, frugal). Five lines, three classes, no trust required.
- Always count from the exponent form: 64 = 2^6 costs 2 digits, not 6
- 100 = 2^2 x 5^2: 4 digits vs 3 - wasteful
- The five-line audit table on this page covers all three classes
FAQs
What is a wasteful number?
A number whose prime factorization, written with exponents, uses more digits than the number itself. 36 is wasteful: 2^2 x 3^2 uses 4 digits against 36's own 2.
Is 125 a wasteful number?
No - 125 is frugal. Its factorization 5^3 uses 2 digits (the prime 5 and the exponent 3) against the number's own 3 digits, so the factorization is shorter, not longer.
How many wasteful numbers are there up to 50?
24: 4, 6, 8, 9, 12, 18, 20, 22, 24, 26, 28, 30, 33, 34, 36, 38, 39, 40, 42, 44, 45, 46, 48 and 50.
What are frugal and equidigital numbers?
The other two classes: frugal numbers have a factorization shorter than the number (125 = 5^3: 2 digits against 3), and equidigital numbers tie (every prime, and 16 = 2^4 with 2 digits against 2). Every integer is exactly one of the three.
What is the smallest wasteful number?
4. Its factorization 2^2 uses 2 digits against the single digit of 4 itself, so even the smallest composite with an exponent is already wasteful.
Are prime numbers wasteful?
No. A prime's factorization is the prime itself, using exactly as many digits - primes are equidigital by definition, never wasteful.