Refactorable Number Checker

Divisors

is 18 refactorable?yes
divisor count tau(18)6
18 mod tau(18)0
next refactorable number24
How this was calculated
  1. A refactorable number (also called a tau number) is one divisible by its own divisor count: n mod tau(n) = 0, where tau counts all positive divisors.
  2. The number 18 has tau(18) = 6 divisors, and 18 mod 6 = 0.
  3. So 18 is refactorable; the next one after it is 24.
  4. Refactorable numbers were named by Curtis Cooper and Robert Kennedy in 1990; every odd refactorable number is a perfect square, which is why the odd entries in the list are sparse.

A refactorable number is a number with a tidy relationship to its own anatomy: it is divisible by the count of its divisors. 18 has 6 divisors, and 18 mod 6 = 0, so 18 is refactorable. 20 also has 6 divisors, but 20 mod 6 = 2, so 20 is not. The property is a small divisibility coincidence - and like many such coincidences, it has a theory.

This refactorable number checker counts divisors exactly (tau(n), the divisor function) and tests the remainder. It also lists every refactorable number up to a bound: up to 50 there are exactly 9 - 1, 2, 8, 9, 12, 18, 24, 36, 40 - which is 18.00% of the numbers in range. The next refactorable number after a failure is reported too, so the sequence is never more than one glance away.

Curtis Cooper and Robert Kennedy named the concept in 1990; the numbers are also called tau numbers, after the divisor function. One theorem is immediate and pretty: every odd refactorable number is a perfect square, because tau(n) is odd only when n is a square - and an odd refactorable number needs an odd tau to divide it evenly in the right way.

Worked examples

Is 18 refactorable?

(Test a number · 18)

is 18 refactorable?yes
divisor count tau(18)6
18 mod tau(18)0
next refactorable number24

Is 20 refactorable?

(Test a number · 20)

is 20 refactorable?no
divisor count tau(20)6
20 mod tau(20)2
next refactorable number24

Refactorable numbers up to 50

(List up to n · 50)

refactorable numbers up to 501, 2, 8, 9, 12, 18, 24, 36, 40
count up to 509
largest in the list40
share of all numbers up to 5018.00%

Divisible by its divisor count

The test is n mod tau(n) = 0, where tau(n) counts all positive divisors of n, including 1 and n itself. tau(18) = 6 (divisors 1, 2, 3, 6, 9, 18) and 18 / 6 = 3 exactly, so 18 passes. tau(20) = 6 as well (1, 2, 4, 5, 10, 20) but 20 / 6 is not an integer, so 20 fails. Same divisor count, different verdict - the property is about the interaction, not the count alone.

The calculator reports tau(n), the remainder, and the next refactorable number after n, so a 'no' answer comes with its nearest 'yes' attached: after both 18 and 20, the next refactorable number is 24.

  • Test: n mod tau(n) = 0
  • 18: tau = 6, remainder 0 - yes
  • 20: tau = 6, remainder 2 - no; next is 24

The list up to 50

Up to 50 the refactorable numbers are 1, 2, 8, 9, 12, 18, 24, 36, 40 - nine numbers, 18.00% of the range. The list has texture: an early cluster (1, 2, 8, 9, 12), then longer gaps. Highly composite-feeling numbers dominate, because a large tau gives the divisibility more chances to land - but tau must divide n exactly, so divisor-rich numbers with the wrong arithmetic still fail, as 20 does.

The density thins as numbers grow: refactorable numbers have asymptotic density zero, yet they never stop appearing. Whether infinitely many exist is, remarkably, still unproved - the sequence is elementary to define and stubborn to analyse, a common pattern for divisor-function conditions.

  • Up to 50: 1, 2, 8, 9, 12, 18, 24, 36, 40
  • Count 9, density 18.00% in range
  • Infinitely many: expected, unproved

Why odd refactorable numbers are squares

Divisors pair up: for every divisor d of n there is a partner n / d, and the pairs are distinct unless d = n / d - that is, unless n is a perfect square, in which case the square root is its own partner and tau(n) is odd. So tau(n) is odd exactly at squares. An odd n divisible by tau(n) with the quotient structure refactorability needs must have odd tau - forcing n to be a square. Hence the odd entries in the list are 1, 9, 25, 49... squares all.

In the list up to 50 the odd entries are 1 and 9 - both squares, as promised. The even entries face no such restriction, which is why evens dominate the sequence.

  • tau(n) is odd exactly at perfect squares
  • Odd refactorable numbers must be squares
  • Odd entries up to 50: 1 and 9

Tau numbers in context

Refactorable numbers sit in a family of divisor-count conditions. Abundant numbers compare the sum of divisors with n; highly composite numbers maximise tau over their range; refactorable numbers ask tau to divide n itself. Each condition carves a different sequence out of the integers, and the three pages on this site let you compare them directly - 36, for instance, is refactorable (tau = 9, 36 mod 9 = 0) and abundant, while 24 is refactorable and highly composite in its neighbourhood.

Cooper and Kennedy's 1990 paper introduced the concept in an undergraduate-friendly setting, and it has since become a staple of elementary number theory courses: easy to state, quick to compute, and with honest open problems attached.

The concept also makes a clean classroom bridge between computation and proof. Students can compute tau by hand for two-digit numbers, test the condition in seconds, and then be asked the two questions that structure the theory: why must odd members be squares (a proof by the divisor-pairing argument, within reach of a first course), and whether the list ever ends (an open problem, honestly labelled as such). Few definitions offer a proof, a computation and a genuine unknown inside one homework exercise.

  • Named by Cooper and Kennedy, 1990
  • Also called tau numbers
  • Neighbours: abundant and highly composite numbers

Worked checks

Three verifications cover the behaviours. 18 passes: tau(18) = 6, remainder 0, next refactorable 24. 20 fails: tau(20) = 6, remainder 2, next refactorable still 24 - the checker reports the same next value, because 'next' looks forward from n, not from the last success. The list to 50 returns 9 numbers with largest 40.

A subtle case is n = 1: tau(1) = 1 and 1 mod 1 = 0, so 1 is refactorable - the first entry of the list, and a good test that an implementation handles the trivial divisor correctly.

  • 18 yes; 20 no; next after both is 24
  • 1 is refactorable (tau(1) = 1)
  • List to 50: 9 numbers, largest 40

Hunting refactorable numbers by hand

The divisor counts of the list members show why they pass. 12 has tau = 6 and 12 mod 6 = 0. 24 has tau = 8 (divisors 1, 2, 3, 4, 6, 8, 12, 24) and 24 mod 8 = 0. 36 has tau = 9 and 36 mod 9 = 0. 40 has tau = 8 and 40 mod 8 = 0. In each case a rich divisor structure meets a compatible residue - and the failures are just as instructive: 16 has tau = 5 and 16 mod 5 = 1; 48 has tau = 10 and 48 mod 10 = 8. Divisor-rich is necessary-leaning, never sufficient.

A practical hunting strategy follows: numbers whose tau is small relative to n and shares n's factors are the promising candidates, which is why multiples of highly composite numbers dominate the list. The checker in test mode does the counting exactly for any n up to 1,000,000, and the 'next refactorable number' it reports after a failure is the fastest way to walk the sequence upward without listing everything.

  • 12: tau 6, passes; 24: tau 8, passes; 36: tau 9, passes; 40: tau 8, passes
  • 16 (tau 5) and 48 (tau 10) fail on remainders
  • Rich divisors help but never suffice

Using the checker

Test mode takes n up to 1,000,000 and returns the verdict with tau(n), the remainder, and the next refactorable number. List mode enumerates all refactorable numbers up to n (keep n at or below 500 for a readable list) with the count and in-range density. Divisor counting is by trial division to the square root - exact for every supported input.

Try the squares among odd numbers - 9, 25, 49 - and watch which pass: all odd refactorable numbers are squares, but not all odd squares are refactorable, and finding where the implication stops is a pleasant five minutes.

  • Test mode up to n = 1,000,000
  • List mode with count and density
  • Exact divisor counting by trial division

FAQs

What is a refactorable number?

A number divisible by its own divisor count: n mod tau(n) = 0, where tau counts all positive divisors. They are also called tau numbers.

Is 18 a refactorable number?

Yes - tau(18) = 6 and 18 mod 6 = 0. The next refactorable number after 18 is 24.

Is 20 a refactorable number?

No - tau(20) = 6 but 20 mod 6 = 2. The next refactorable number is 24.

What are the refactorable numbers up to 50?

1, 2, 8, 9, 12, 18, 24, 36, 40 - nine numbers, 18.00% of the range, the largest being 40. The density already tells the story of the sequence's character: thick on the ground among small numbers - 1 and 2 are both there at the start - and steadily rarer as the divisor counts grow more slowly than the numbers themselves.

Why is every odd refactorable number a square?

Because tau(n) is odd only at perfect squares (divisors pair up except the square root), and an odd refactorable number must have an odd divisor count.

Who named refactorable numbers?

Curtis Cooper and Robert Kennedy, in 1990. Whether infinitely many exist is still an open question.

Sources

Related calculators

Abundant Number Calculator
Classify any whole number as abundant, perfect or deficient from its aliquot sum: the sum of its proper divisors, the abundance or deficiency against the number itself, and the s(n)/n ratio that puts perfect numbers exactly at one.
Highly Composite Number Calculator
Check whether a number is highly composite by comparing its divisor count with every smaller integer.
Smith Number Calculator
Test whether a number is a Smith number: compare the sum of its digits with the sum of the digits of its prime factors counted with multiplicity, with the full prime factorization shown - 666 and 22 qualify, most numbers do not.