Telephone Number Calculator

Pairings

telephone number T(6)76
T(n - 1)26
T(n - 2)10
recurrence check T(n - 1) + (n - 1) x T(n - 2)76
How this was calculated
  1. A telephone number T(n) counts the ways 6 subscribers can be split into single lines and connected pairs - equivalently, the involutions of n elements.
  2. Use the recurrence T(n) = T(n - 1) + (n - 1) x T(n - 2): subscriber n either stays single or pairs with one of the other n - 1 subscribers.
  3. Running the recurrence up from T(0) = 1 and T(1) = 1 gives T(6) = 76, and the recurrence check in the results reproduces it.
  4. The same numbers count involutions in permutations - permutations made only of fixed points and swaps - which is why they appear across combinatorics.

In 1800s telephone exchanges, operators connected subscribers with patch cords, and a natural question arose: in how many ways can n subscribers be paired up into calls, with some possibly left unconnected? The answer is the telephone number T(n) - also called the involution number, because it counts the permutations of n elements that are their own inverse.

This calculator evaluates T(n) exactly. The anchors: T(3) = 4, T(4) = 10, T(5) = 26, and the sequence runs 1, 1, 2, 4, 10, 26, 76, 232 for n = 0 to 7. The recurrence is the soul of the definition: T(n) = T(n - 1) + (n - 1) x T(n - 2) - subscriber n either stays unconnected, or is paired with one of n - 1 partners, leaving n - 2 subscribers to arrange.

The same numbers count involutions in algebra, matchings in graph theory and hermitian matrices' eigenvalue patterns in random matrix theory - a reminder that a good counting sequence rarely belongs to just one subject.

Worked examples

Six subscribers

(6)

telephone number T(6)76
T(n - 1)26
T(n - 2)10
recurrence check T(n - 1) + (n - 1) x T(n - 2)76

Ten subscribers

(10)

telephone number T(10)9,496
T(n - 1)2,620
T(n - 2)764
recurrence check T(n - 1) + (n - 1) x T(n - 2)9,496

Eight subscribers

(8)

telephone number T(8)764
T(n - 1)232
T(n - 2)76
recurrence check T(n - 1) + (n - 1) x T(n - 2)764

Pairings with leftovers allowed

The telephone interpretation makes the recurrence inevitable. Look at subscriber n. Either n makes no call: then the remaining n - 1 subscribers can be arranged in T(n - 1) ways. Or n calls somebody: there are n - 1 choices of partner, and the remaining n - 2 subscribers can be arranged in T(n - 2) ways. Total: T(n) = T(n - 1) + (n - 1) T(n - 2). Starting from T(0) = 1 (the empty exchange) and T(1) = 1, the recurrence generates the whole sequence with nothing but additions and multiplications.

Audit the recurrence at n = 4: T(4) = T(3) + 3 x T(2) = 4 + 3 x 2 = 10. And at n = 5: T(5) = T(4) + 4 x T(3) = 10 + 16 = 26. Both match the tabulated values, and the calculator's step display shows exactly this build-up for your n, so the arithmetic can be followed rather than trusted.

  • T(n) = T(n - 1) + (n - 1) x T(n - 2)
  • T(3) = 4, T(4) = 10, T(5) = 26, T(6) = 76
  • Sequence from n = 0: 1, 1, 2, 4, 10, 26, 76, 232
  • Audit: T(5) = T(4) + 4 x T(3) = 10 + 16 = 26

Involutions: the same numbers in algebra

A permutation is an involution when applying it twice returns everything to place - equivalently, its cycle structure uses only fixed points and swaps. Count those permutations and you get the telephone numbers again, term for term: the fixed points are the unconnected subscribers, the swaps are the calls. This is why the sequence carries two names, and why algebra texts and combinatorics texts tabulate the same list.

The involution view adds a second formula: T(n) = sum over k of n! / ((n - 2k)! k! 2^k), choosing k disjoint swaps. The exponential generating function is exp(x + x^2/2) - the x for fixed points, the x^2/2 for swaps. All three descriptions - recurrence, sum, generating function - are interchangeable, and the calculator's recurrence display is the most elementary of the three.

  • Involution: a permutation equal to its own inverse - cycles of length 1 and 2 only
  • T(n) = sum_k n! / ((n - 2k)! k! 2^k) over the number k of pairs
  • Exponential generating function: exp(x + x^2 / 2)

Growth: faster than exponential, slower than factorial

The ratios T(n)/T(n - 1) do not settle to a constant - the sequence grows faster than any geometric progression. The precise asymptotic shape is T(n) ~ C x (n/e)^(n/2) x e^(sqrt(n)) for an explicit constant C: the dominant factor (n/e)^(n/2) is the signature of pairing growth (half a factorial's worth of freedom), corrected by the e^(sqrt(n)) term that accounts for the unpaired leftovers. The calculator reports the ratio T(n)/T(n - 1) alongside the value, so the acceleration - the ratio itself grows like sqrt(n) - is visible in the output rather than hidden in a formula.

For a feel of the scale: T(10) = 9,496, and by n = 20 the count is in the tens of billions. The growth sits strictly between exponential and factorial - faster than c^n for every constant c, slower than n! - which matches the pairing intuition exactly: pairings are plentiful, but the factorial's full ordering freedom is not there.

  • T(10) = 9,496; the sequence grows faster than any geometric progression
  • Growth order: roughly (n/e)^(n/2) with an e^sqrt(n) correction
  • Slower than n! - pairings lack the factorial's ordering freedom

Where telephone numbers appear

Beyond exchanges and involutions, T(n) counts the matchings of a complete graph on n vertices (pairings with leftovers are exactly matchings), the number of ways to tile with dominoes and monomers in one dimension counted by configurations, and the dimension-related counts for representations of the symmetric group restricted to involution classes. The same recurrence governs each: an object either leaves the last element alone or pairs it off.

That ubiquity is the practical reason to have the values exact. If a count in your own problem satisfies 'leave one out, or pair it with one of the others', the telephone numbers are your sequence, and this page's table - 1, 1, 2, 4, 10, 26, 76, 232 - is the fingerprint to compare against.

The telephone numbers also count something in algebra that surprises most readers: the number of involutions in the symmetric group equals the sum of the dimensions... precisely, T(n) equals the sum of the dimensions of all irreducible representations of the symmetric group S_n - a theorem that ties the pairing count to representation theory. The equality is not a coincidence of small numbers; it is a structural identity, and it gives the humble exchange-pairing count a second life in graduate algebra texts.

Fingerprint check: if your counting problem gives 4 at n = 3, 10 at n = 4 and 26 at n = 5, you are counting telephone numbers - pairings, involutions, or matchings in disguise.

A worked table and how to read it

Read the sequence as a table of possibilities: T(0) = 1 (the empty exchange), T(1) = 1, T(2) = 2 (one call or none), T(3) = 4, T(4) = 10, T(5) = 26, T(6) = 76, T(7) = 232. At n = 4 the ten arrangements can be enumerated by the number of calls: no calls (1 way), exactly one call (C(4,2) = 6 ways), or two calls (3 ways of splitting four subscribers into two pairs) - total 1 + 6 + 3 = 10. The calculator's sum formula counts exactly this way, by number of pairs k.

The same decomposition at n = 5: no calls 1, one call 10, two calls 15 - total 26. Notice the two-call count: choose the unpaired subscriber (5 ways), then split the remaining four into two pairs (3 ways) - 15. Watching the k-by-k breakdown grow is the combinatorial content of the sequence, and it is why the closed sum and the recurrence must agree - both are counting the same table.

  • T(4) = 10 by cases: 1 (no calls) + 6 (one call) + 3 (two calls)
  • T(5) = 26 by cases: 1 + 10 + 15
  • The sum over k (number of pairs) and the recurrence count the same table

Telephone numbers in the wild

The pairing structure recurs wherever objects are matched or left single. In chemistry, counting ways to place paired bonds; in physics, the moments of the Gaussian distribution are telephone-like numbers (the even moments count pairings of variables - Wick's theorem is, at heart, a pairing count); in computer science, matchings in complete graphs are counted by T(n), and the recurrence drives dynamic-programming solutions for pairing problems.

The Gaussian connection is worth one line of detail: the 2k-th moment of the standard normal is (2k - 1)!! = 1 x 3 x 5 x ... - a product of odd numbers that counts the pairings of 2k objects with none left over. The telephone numbers generalize it by allowing leftovers, which is why they appear whenever a pairing model permits unmatched elements.

  • Wick pairings in physics and Gaussian moments count pairings
  • Complete-graph matchings are counted by T(n)
  • The double factorial (2k - 1)!! is the no-leftovers special case

FAQs

What is a telephone number in mathematics?

T(n) counts the ways to pair up n subscribers into calls with some left unconnected - equivalently, the involutions on n elements. T(3) = 4, T(4) = 10, T(5) = 26.

What is the recurrence for telephone numbers?

T(n) = T(n - 1) + (n - 1) x T(n - 2): subscriber n either stays unconnected, or pairs with one of n - 1 partners. Check: T(5) = T(4) + 4 x T(3) = 10 + 16 = 26.

What is T(6)?

76. The sequence runs 1, 1, 2, 4, 10, 26, 76, 232 for n = 0 through 7, and T(10) = 9,496.

Why are they called involution numbers?

They count permutations that are their own inverse - permutations whose cycles all have length 1 or 2. The fixed points are unconnected subscribers and the 2-cycles are the calls, so the counts coincide exactly.

How fast do telephone numbers grow?

Faster than any geometric progression but slower than the factorial - roughly (n/e)^(n/2) times an e^sqrt(n) factor. The ratio T(n)/T(n - 1) keeps growing like sqrt(n), and the calculator displays it.

What does T(0) = 1 mean?

The empty arrangement: with no subscribers there is exactly one way to have no calls. It seeds the recurrence alongside T(1) = 1.

Sources

Related calculators

Permutation and Combination Calculator
nPr and nCr with and without repetition — permutations where order matters, combinations where it does not — with all four counts side by side.
Absolute Value Calculator
Absolute values and the distance between two numbers on the number line: |a|, |b| and |a - b|, with the sign-stripping logic spelled out.
Abundancy Index Calculator
Compute the abundancy index sigma(n)/n of a number, classify it as deficient, perfect or abundant, and test whether two numbers are friendly.