ForHosting KIT · Math

Padovan sequence calculator

P(10) is 12: each Padovan number adds the terms two and three places back, starting from three ones, so the list runs 1, 1, 1, 2, 2, 3, 4, 5, 7, 9, 12. Enter an index up to 130 to get its exact term. 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
10
You get
Padovan
12
Recurrence
P(0)=P(1)=P(2)=1; P(n)=P(n-2)+P(n-3) for n>2

The Padovan sequence is a cousin of the Fibonacci sequence defined by a three-term recurrence with a two-step lag: each term is the sum of the term two places back and the term three places back.

What the Padovan sequence is and how the recurrence works

Start with three ones: P of zero, P of one, and P of two are each one. For every later index the rule is fixed and memoryless beyond the last three values: P of n equals P of n minus two plus P of n minus three. Unrolling a few steps produces two, two, three, four, five, seven, nine, twelve, sixteen, twenty-one, twenty-eight, thirty-seven, forty-nine, and so on.

The same recurrence appears in plastic-number geometry, in certain spiral tilings of the plane with equilateral triangles, and in combinatorial counts of compositions that avoid consecutive parts of length one under specific encodings. Unlike Fibonacci, which sums the two previous terms, Padovan skips one predecessor and adds the one before that, so the characteristic equation is x cubed equals x plus one and the dominant real root is the plastic constant near one point three two four seven.

Because every step is exact integer addition, there is no rounding error and no dependence on wall-clock time or random seeds.

Practical tips, limits, and related searches

When grading, assert both padovan and the formula fields so a wrong recurrence or a Fibonacci mix-up is easy to diagnose. Sibling landings in this kit cover other figurate and series intents such as triangular numbers, polygonal numbers, and arithmetic series sums; this page is specifically for people searching for a Padovan sequence calculator or the n-th Padovan number.

Do not treat the integer alone as a black box—pair it with the documented seeds when teaching so OEIS A000931-style alternate initial conditions are not confused with the P zero equals P one equals P two equals one convention used here. Cap n at one hundred thirty so every P of n remains a JavaScript safe integer; if you need larger terms, switch to big-integer tooling outside this free parse path.

Programming contest and interview prep validators

Assert candidate solutions for Padovan recurrence problems without reimplementing the loop in every language harness.

Teaching demos of plastic-number growth and three-term recurrences

Project n, padovan, formula, and recurrence in class so learners see the seeds, the lag-two-plus-lag-three rule, and exact integer growth.

What is a Padovan number?

A term of the sequence defined by P(0)=P(1)=P(2)=1 and P(n)=P(n-2)+P(n-3) for n>2. Examples: P(5)=3, P(10)=12, P(20)=200.

Is P(0) equal to 1?

Yes under the convention used here: P(0)=P(1)=P(2)=1. Some OEIS variants use different seeds; this tool documents its seeds in every response.

Is the Padovan sequence calculator free?

The browser tool is free and runs locally.

How is the Padovan sequence different from Fibonacci?

Fibonacci adds the two previous terms, while Padovan skips the previous one and adds the terms two and three places back. Its terms grow by a ratio that approaches the plastic number, about 1.3247, the real root of x³ = x + 1.

What is the largest index I can enter?

130. Up to that index every term stays an exact whole number, with no rounding at any step. For terms further along the sequence you would need a dedicated tool for very large numbers.

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/math/padovan-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/math/padovan-number \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"n":10}'
{
  "n": 10
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "math.padovan_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.

max_n130
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.

What the Padovan sequence is and how the recurrence works

When you only need a single term, send the index n; the response echoes n, the Padovan value, a short formula string, and the full recurrence seed description so graders and students can recompute by hand.

How to call the API and what comes back

A successful response includes n as echoed, padovan equal to P of n, formula equal to the string P of n equals P of n minus two plus P of n minus three, and recurrence documenting the seeds and the rule for n greater than two. Use it from homework pipelines, programming-contest validators, interview-prep sandboxes, notebook enrichment jobs, or any workflow that needs a reproducible Padovan term without installing specialized sequence packages on every machine. Send a JSON body with a single required field n: a non-negative whole number at most one hundred thirty, the index of the Padovan term you want. Aliases index and order are accepted for the same meaning. Failed validation—a missing n, a non-integer, a fraction, a value above the published limit of one hundred thirty, or any negative number—returns invalid_input and is never charged. Pricing is a flat $0.002 per successful request with unit item and zero marginal unit price. Keep n inside the safe-integer cap so every intermediate sum stays exact on the Worker and in the browser; for multiprecision indices beyond that limit, use a dedicated big-integer stack instead of this lightweight parse capability.

Practical tips, limits, and related searches

Prefer paired classroom examples: n equals zero yields one; n equals ten yields twelve; n equals twenty yields two hundred; and a negative n demonstrates the hard rejection path with invalid_input. Because the loop is linear in n and uses only three rolling integers, students can recompute small terms on paper and match the API line by line. Failed tasks that return invalid_input do not consume prepaid balance, which keeps exploratory scripts cheap when users type bad values while learning the contract.

Homework: compute the n-th Padovan number

Give students an index and check their hand-computed Padovan value against a deterministic API or free browser result with the same seeds and recurrence.

How is Padovan different from Fibonacci?

Fibonacci adds the two previous terms. Padovan adds the term two steps back and the term three steps back, so its growth rate is the plastic constant, not the golden ratio.

What inputs are rejected?

Missing n, non-integers, values above 130, and any negative number return invalid_input. Those failures are not charged.

Read the full KIT documentation →