Thabit Number Calculator

Term

Thabit number T(n)11
The 3 x 2^n term12
Digits in T(n)2
PrimalityPrime
How this was calculated
  1. Thabit numbers have the form 3 x 2^n - 1, named for the ninth-century mathematician Thabit ibn Qurra.
  2. For n = 2: 2^n = 4, so the product term is 3 x 2^n = 3 x 4 = 12.
  3. Subtracting 1 gives the Thabit number T(2) = 12 - 1 = 11.
  4. T(2) is prime; Thabit used prime values of this family in his rule for generating amicable pairs, where T(n) and T(n - 1) both prime is the key condition.

This Thabit number calculator computes Thabit numbers, which have the form T(n) = 3 x 2^n - 1 and are named for Thabit ibn Qurra. Enter a value of n and the calculator applies the formula directly, showing the resulting Thabit number and whether it is prime or composite. For example, T(2) = 3 x 4 - 1 = 11, which is prime. T(4) = 3 x 16 - 1 = 47, which is also prime. Not every Thabit number is prime, though: T(5) = 3 x 32 - 1 = 95 = 5 x 19, which is composite. The calculator gives you the exact value for your chosen n along with its primality result, so you can check any term in the sequence without doing the arithmetic by hand.

The method behind the calculator is simply the defining formula T(n) = 3 x 2^n - 1, applied exactly as stated, which is why it is the accepted standard for this kind of calculation: there are no shortcuts or approximations, only the exponentiation, multiplication and subtraction the definition requires. Primality is then determined for the specific number produced, which matters because Thabit's rule uses prime Thabit numbers to build amicable pairs; the pair 220 and 284 comes from this family. On this page you will find the formula, step-by-step workings, worked examples such as T(2) = 11, T(4) = 47 and T(5) = 95, and the sources used, so you can follow every step and verify each result yourself.

Worked examples

n = 2 gives 11

(2)

Thabit number T(n)11
The 3 x 2^n term12
Digits in T(n)2
PrimalityPrime

n = 4 gives 47

(4)

Thabit number T(n)47
The 3 x 2^n term48
Digits in T(n)2
PrimalityPrime

n = 5 gives 95

(5)

Thabit number T(n)95
The 3 x 2^n term96
Digits in T(n)2
PrimalityComposite: 5 x 19

What is a Thabit number?

A Thabit number is a whole number built from a simple recipe: T(n) = 3 x 2^n - 1. In plain terms, you take 2, raise it to the power n, multiply the result by 3, and then subtract 1. The n is a non-negative integer, so each value of n produces exactly one Thabit number. The sequence is named for Thabit ibn Qurra, the ninth-century mathematician who studied these numbers and the patterns hiding inside them. A thabit number calculator simply runs this formula for whatever n you enter, so you can see the result without doing the arithmetic by hand.

Working through a few small cases makes the formula concrete. For n = 2, the calculation is T(2) = 3 x 4 - 1 = 11, and 11 is prime. For n = 4, it is T(4) = 3 x 16 - 1 = 47, which is also prime. Not every value of n gives a prime, though. At n = 5, the formula gives T(5) = 3 x 32 - 1 = 95, and 95 factors as 5 x 19, so it is composite. That mix of primes and composites is part of what makes these numbers interesting to study: the formula is fixed and easy to write down, but whether a given result is prime is not obvious just from looking at n.

Thabit ibn Qurra worked in Baghdad during the ninth century, and his name is attached to this family of numbers because of the use he made of them. Thabit's rule uses prime Thabit numbers to build amicable pairs. An amicable pair is two numbers where each one equals the sum of the other's proper divisors, and the classic example is the pair 220 and 284, which comes from this family. So the numbers defined by 3 x 2^n - 1 were not idle curiosities for Thabit; they were tools for constructing pairs of numbers with a special relationship to each other.

For a general audience, the practical takeaway is that a Thabit number is defined entirely by its exponent n. Change n and you get a different number; the factor of 3 and the subtraction of 1 stay the same every time. Because the definition is so direct, checking a value is a matter of substitution and arithmetic, and testing whether the result is prime takes a little more work. That is where a calculator earns its place: it handles the formula instantly and lets you focus on the result, whether that result turns out to be prime like 11 and 47 or composite like 95.

The formula: T(n) = 3 x 2^n - 1. Examples: T(2) = 11 (prime), T(4) = 47 (prime), T(5) = 95 = 5 x 19 (composite).

Worked values

A thabit number calculator is easiest to trust when you can see the arithmetic behind each result. Thabit numbers have the form T(n) = 3 x 2^n - 1, and they are named for Thabit ibn Qurra. Working through small values of n shows both how quickly the numbers grow and how the primality picture can change from one n to the next.

Start with n = 2. The formula gives T(2) = 3 x 4 - 1 = 11. Because 11 has no divisors other than 1 and itself, T(2) is prime. Next, take n = 4. Here T(4) = 3 x 16 - 1 = 47. Like 11, 47 is prime, so the first two worked values in this set are both prime Thabit numbers.

The pattern does not continue at n = 5. Substituting gives T(5) = 3 x 32 - 1 = 95. Unlike 11 and 47, 95 is not prime: it factors as 5 x 19, so T(5) is composite. This is the key contrast in the worked set. Two consecutive even inputs, n = 2 and n = 4, both produce primes, while the next input shown, n = 5, produces a composite. A calculator that only reported "prime" or "composite" without the factorization would hide the useful detail that 95 splits into 5 and 19.

These values also connect to a larger purpose. Thabit's rule uses prime Thabit numbers to build amicable pairs, and the pair 220 and 284 comes from this family. That makes the primality check more than a curiosity: whether T(n) is prime determines whether the number can play its part in the rule. In the worked values above, 11 and 47 are prime and therefore qualify as inputs of the right kind, while 95 does not, since 5 x 19 is a product of two smaller factors.

When you use a thabit number calculator, check each step against the form T(n) = 3 x 2^n - 1. Confirm the power of 2 first, multiply by 3, then subtract 1. For n = 2 that is 4, then 12, then 11. For n = 4 it is 16, then 48, then 47. For n = 5 it is 32, then 96, then 95. Seeing the intermediate numbers makes it clear where a mistake could creep in, especially with the subtraction step, and it shows why 95 is the one composite result in this small set.

  • T(2) = 3 x 4 - 1 = 11, which is prime.
  • T(4) = 3 x 16 - 1 = 47, which is prime.
  • T(5) = 3 x 32 - 1 = 95 = 5 x 19, composite.
nComputationT(n)Primality or factorization
23 x 4 - 111Prime
43 x 16 - 147Prime
53 x 32 - 195Composite: 5 x 19
Only two of these three worked values are prime. T(2) = 11 and T(4) = 47 are prime, but T(5) = 95 is composite because 95 = 5 x 19.

Thabit's rule for amicable pairs

Thabit's rule is a recipe for building amicable pairs — two different numbers whose proper divisors add up to each other. The recipe does not use just any Thabit numbers. It needs prime Thabit numbers at a specific pattern of positions, which is why a Thabit number calculator that checks primality is the natural first step before you apply the rule.

The rule looks at three consecutive values of n, say n, n+1 and n+2. Two of the three conditions ask for prime Thabit numbers at the first two of those positions: T(n) and T(n+1) must both be prime. The third condition is a separate prime test built from the same n, and only when all three tests pass does the rule produce an amicable pair. In other words, two prime Thabit numbers sitting at consecutive n are necessary but not sufficient on their own — the third prime condition has to hold as well.

The classic example is the pair 220 and 284, which comes from this family. It is the smallest amicable pair and the one most often used to introduce the idea. The pair 220 and 284 comes from this family of Thabit constructions, so it is a useful check on your understanding of the rule: if you can trace how the conditions line up for that pair, you have the mechanics right.

It helps to see which Thabit numbers are prime and which are not, because the rule lives or dies on those tests. T(2) = 3 x 4 - 1 = 11, which is prime. T(4) = 3 x 16 - 1 = 47, which is prime. T(5) = 3 x 32 - 1 = 95 = 5 x 19, composite. A composite value like 95 immediately rules out any n position where it appears, no matter how promising the neighboring values look.

That is the practical value of a thabit number calculator: it evaluates T(n) = 3 x 2^n - 1 for the positions you care about and tells you whether each result is prime, so you can check the two consecutive prime conditions before spending time on the third. The rule is a filter, not a guarantee — plenty of n values fail one test or another. When all the conditions hold, the payoff is an amicable pair like 220 and 284.

  • Two prime Thabit numbers at consecutive n are required, but they are not enough by themselves.
  • A third prime condition, built from the same n, must also hold.
  • T(2) = 11 is prime; T(4) = 47 is prime; T(5) = 95 = 5 x 19 is composite.
  • The pair 220 and 284 comes from this family and serves as the standard example.
Prime Thabit numbers at consecutive n are necessary but not sufficient — the third prime condition must also pass before the rule yields an amicable pair.

Thabit primes

A Thabit number has the form T(n) = 3 x 2^n - 1, named for Thabit ibn Qurra. When you run values through a thabit number calculator, the arithmetic is simple, but the results are not all alike. Some values of n produce a prime, and many do not. That split is what makes Thabit primes interesting: they are the rare prime outcomes inside a sequence that is easy to generate but hard to predict.

Small cases show both outcomes. T(2) = 3 x 4 - 1 = 11, which is prime. T(4) = 3 x 16 - 1 = 47, which is prime. T(5) = 3 x 32 - 1 = 95 = 5 x 19, composite. So even at the start of the sequence, a prime can be followed by a composite in the very next step. Nothing about the form of T(n) guarantees a prime, and no simple pattern of exponents separates the prime values from the composite ones.

That sparseness is the main point. Each step in n roughly doubles the size of the number, so the values grow quickly, while the chance that any given value is prime tends to shrink as the numbers get larger. A calculator can confirm primality for a specific n, but it does not make primes common. In practice, most values you test will be composite, and the prime ones are isolated finds rather than a steady run.

This is why Thabit primes connect to the broader search for large primes of special forms. Numbers written as a small multiplier times a power of two, minus one, belong to a family that can be tested and described efficiently, and primes in such families are tracked and studied much like other structured primes. The same sparse, hard-to-predict behavior appears across those searches: the form is fixed and simple, but the prime instances are few and scattered.

Thabit's rule uses prime Thabit numbers to build amicable pairs — the pair 220 and 284 comes from this family. That gives the prime values a purpose beyond curiosity: a prime Thabit number can serve as one ingredient in constructing a matched pair of numbers whose divisors sum to each other. The connection does not make Thabit primes more frequent, but it shows why identifying them matters. A thabit number calculator lets you test individual values and see for yourself how often the sequence lands on a prime — usually rarely, and never by an obvious rule.

Prime Thabit numbers are the exception, not the rule: T(2) = 11 and T(4) = 47 are prime, but T(5) = 95 = 5 x 19 is composite.

FAQs

What is the formula for a Thabit number?

A Thabit number follows the formula T(n) = 3 x 2^n - 1. You take 2 raised to the power n, multiply by 3, then subtract 1. For n = 4, that is 3 x 16 - 1 = 47. The calculator applies this same formula to whatever n value you enter.

Is 47 a Thabit prime?

Yes - T(4) = 47 is prime. Because 47 has no divisors other than 1 and itself, it counts as a Thabit prime. This is a useful check on the formula: plugging n = 4 into T(n) = 3 x 2^n - 1 gives 3 x 16 - 1 = 47, and that result is prime.

Is 95 prime?

No. T(5) = 95 = 5 x 19. Since 95 factors into 5 times 19, it is composite, not prime. So while 95 is a Thabit number, it is not a Thabit prime. This shows that a Thabit number can be composite even when nearby values, like 47, are prime.

Who was Thabit ibn Qurra?

Thabit ibn Qurra was a ninth-century mathematician and astronomer who studied these numbers and gave a rule for generating amicable pairs from them. His work on the numbers of the form 3 x 2^n - 1 is why they carry his name today.

How do Thabit numbers produce amicable pairs?

When T(n) and T(n - 1) are both prime and a third related value is prime, Thabit's rule yields an amicable pair - 220 and 284 is the classic output. Amicable pairs are two numbers whose divisors sum to each other, and Thabit's rule is a way to generate them.

Are Thabit numbers related to Mersenne numbers?

They are cousins: Mersenne numbers are 2^n - 1, Thabit numbers are 3 x 2^n - 1. Both are built from a power of 2 with 1 subtracted, but the Thabit form adds a factor of 3. That small change means the two families share structure but produce different values.

Sources

Related calculators

Mersenne Prime Calculator
Test whether a Mersenne number 2^p - 1 is prime with the Lucas-Lehmer test, for exponents up to 61.
Perfect Number Calculator
Classify a number as perfect, abundant or deficient by comparing it with the sum of its proper divisors (its aliquot sum).
Prime Factorization Calculator
Break any whole number up to a trillion into its prime factors — with divisor count, divisor sum and largest prime factor.