nth Padovan Number
Return the Padovan sequence with P(0)=P(1)=P(2)=1 and P(n)=P(n−2)+P(n−3) as an exact decimal integer; the index is capped at 10,000.
Description
Padovan numbers add the terms two and three places earlier, skipping the immediately preceding term.
Padovan numbers add the terms two and three places earlier, skipping the immediately preceding term. The all-one initial triple fixes this sequence convention.1
The tool returns value. The indexing and output conventions below determine how to read these values.
When to use nth Padovan Number
Use this for the following task: Return the Padovan sequence with P(0)=P(1)=P(2)=1 and P(n)=P(n−2)+P(n−3) as an exact decimal integer; the index is capped at 10,000. Use the input and output conventions below to reproduce the intended mathematical quantity.
How to use nth Padovan Number and understand its results
- Choose the required indexes, integers or sequence entries. Preserve decimal-string encodings where the field table specifies strings.
- Enter n according to the field table, then run the tool.
- Read value. Preserve exact decimal strings and the stated indexing or coefficient order.
- Keep exact decimal strings for subsequent integer arithmetic; distinguish them from any explicitly approximate numeric result.
| Input field | Meaning | Value type and bounds | Requirement |
|---|---|---|---|
| n | Zero-indexed term (resource limit 10000) | integer; minimum 0; maximum 10000 | Required |
Maintain three BigInt values and shift them with next=a+b for n iterations. Return the selected zero-based term as decimal text.
P(0)=P(1)=P(2)=1; P(n)=P(n−2)+P(n−3) The symbols and boundary conditions refer to the supplied fields and the implementation described above.
| Output field | Meaning | Value type |
|---|---|---|
| value | Padovan number | string (integer/arbitrary) |
{
"input": {
"n": 10
},
"output": {
"value": "12"
}
} Limitations and assumptions
The index is at most 10000. Other starting triples are not supported, and the tool does not return the full prefix.
Use the declared integer bounds and string formats. Large exact outputs remain decimal strings; numerical approximations use ordinary floating-point arithmetic. A rejected input is different from a valid zero count or false membership flag.
Alternative or Complementary methods
Choose nth Tribonacci Number when you need its operation: Return T(n) exactly with T(0)=T(1)=0, T(2)=1, and each later term the sum of the preceding three; the index is capped at 10,000. Choose nth Pell Number for the complementary operation: Return P(n) exactly with P(0)=0, P(1)=1, and P(n)=2P(n−1)+P(n−2); the index is capped at 10,000.
Background reference: OEIS A000931.
References
-
OEIS A000931 — OEIS Foundation
Similar or alternative tools
- nth Tribonacci Number
Return T(n) exactly with T(0)=T(1)=0, T(2)=1, and each later term the sum of the preceding three; the index is capped at 10,000.
- nth Pell Number
Return P(n) exactly with P(0)=0, P(1)=1, and P(n)=2P(n−1)+P(n−2); the index is capped at 10,000.