ForHosting KIT · Math

Woodall number generator

The fifth Woodall number is 5 × 2⁵ − 1 = 159, a number with 3 digits. Enter a positive position to get its exact Woodall number and digit count, even when the value runs to many digits. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
N
5
You get
Woodall
159
Decimal digits
3

A Woodall number is an integer of the special form W(n) equals n times two to the power n, minus one, where n is a positive integer index. The sequence begins one, seven, twenty-three, sixty-three, one hundred fifty-nine, and grows exponentially because of the two-to-the-n factor, so large terms quickly need arbitrary-precision arithmetic rather than floating-point. Woodall numbers sit next to Cullen numbers in classical number-theory tables: Cullen numbers use n times two to the n plus one, while Woodall flips the constant term to minus one. Students, contest coaches, and content authors need a deterministic oracle that returns the exact decimal expansion for an arbitrary safe index without hand-maintaining huge strings. This capability accepts a positive integer n, computes W(n) with exact BigInt arithmetic, and returns the full decimal value together with a digit count and a short formula.

What Woodall numbers are and how W(n) is defined

Allan Joseph Champneys Cunningham and H. J. Woodall studied integers of the form n times a power of two, plus or minus one, and the family W(n) equals n times two to the n minus one is now universally called the Woodall sequence.

The first few terms are familiar enough for classroom checks: W(1) equals one times two minus one which is one; W(2) equals two times four minus one which is seven; W(3) equals three times eight minus one which is twenty-three; W(4) equals four times sixteen minus one which is sixty-three; W(5) equals five times thirty-two minus one which is one hundred fifty-nine.

After that the values grow rapidly: W(10) already has four digits, and W(100) has thirty-two digits, so any serious calculator must use integer bit shifts rather than double-precision floats. A Woodall prime is simply a Woodall number that is prime; for example W(2) equals seven and W(3) equals twenty-three are prime, while W(4) equals sixty-three is composite.

Related families such as Mersenne numbers two to the p minus one and Cullen numbers n times two to the n plus one answer different search intents even when the arithmetic looks similar; keep those as separate SEO pages rather than overloading a Woodall generator. Because the formula is a single closed expression, the algorithm is fully deterministic: the same n always yields the same decimal string, with no network calls, no random bits, and no wall-clock dependency.

Where a Woodall number generator earns its keep

Contest programmers and olympiad coaches use small Woodall terms as warm-ups before harder modular-arithmetic or primality problems, and they need a deterministic oracle that students cannot accidentally diverge from a spreadsheet formula that overflows. Research notebooks that tabulate Woodall primes or compare Woodall and Cullen families can pull exact W(n) strings without hand-maintaining large constants. Keep requests within the published index cap, document that n is a positive integer starting at one, and treat woodall as the canonical answer field for automated checks.

If you later need Mersenne checks, Cullen numbers, or general primality of an arbitrary integer, treat those as separate search intents rather than overloading this Woodall-focused landing.

Homework and olympiad warm-ups

Compute W(n) = n · 2^n − 1 for classroom indices and verify exact decimal values against textbook tables without overflow surprises.

What is a Woodall number?

A Woodall number is an integer of the form W(n) = n · 2^n − 1 for a positive integer index n. The sequence starts 1, 7, 23, 63, 159, … and grows exponentially with n.

Does n below 1 cause an error?

The generator only accepts positive integer indices from 1 through 10,000 inclusive.

How is W(n) computed?

Exactly with BigInt: shift 1 left by n bits to obtain 2^n, multiply by n, then subtract 1. The result is returned as a full decimal string so large terms never lose precision.

Is the result deterministic?

There is no randomness, network call, or model involved—only exact integer arithmetic.

What does it cost?

The browser tool is free and runs locally.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/numth/woodall-number

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/numth/woodall-number \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"n":5}'
{
  "n": 5
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "numth.woodall_number",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Indices below one are rejected with invalid_input so graders and scripts never treat zero or negative positions as valid sequence terms.

What Woodall numbers are and how W(n) is defined

This endpoint does not claim primality—it returns the exact value of W(n)—so homework that asks only for the sequence term stays separate from primality-search landings.

Input contract, response fields, and error behaviour

Values below one—including zero and every negative index—fail with a clear message that the Woodall index must be at least one; those validation failures are not billed. Spot checks you can trust without a textbook open: n equals one yields woodall one; n equals two yields seven; n equals three yields twenty-three; n equals five yields one hundred fifty-nine; n equals zero fails validation. POST a JSON body with a single required field n: a positive integer greater than or equal to one, either as a JSON number or as a decimal digit string, at most ten thousand. The aliases index and order are accepted with the same meaning. Missing n, empty strings, non-integers, non-finite numbers, and values above the maximum fail with invalid_input naming the problem. On success the body echoes n, provides woodall as the full decimal string of n times two to the n minus one, decimal_digits as the character length of that string, and formula as the short identity W(n) equals n times two to the n minus one. Returning woodall as a string rather than a JSON number protects clients when the value exceeds JavaScript safe-integer range, which happens for modest n already. API pricing is the published base of $0.002 per successful item; failed validation does not consume balance.

Where a Woodall number generator earns its keep

Because the capability is a pure parse engine, every successful call costs the published $0.002 base price with no model tokens and no outbound network, failed validation does not consume balance, and the algorithm is a single BigInt shift and multiply.

Deterministic fixtures for number-theory demos

Generate stable woodall decimal strings and digit counts for slides, unit tests, and documentation without hand-maintaining large constants.

Pipeline-friendly Woodall sequence terms

Call the same isomorphic contract from scripts and CI so Woodall value assertions never depend on a casual web form or a language model.

Read the full KIT documentation →