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.

Description

Tribonacci numbers extend a two-term recurrence by summing three preceding terms.

Tribonacci numbers extend a two-term recurrence by summing three preceding terms. Initial values and indexing are essential because several different sequences share the name.1

The tool returns value. The indexing and output conventions below determine how to read these values.

When to use nth Tribonacci Number

Use this for the following task: 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. Use the input and output conventions below to reproduce the intended mathematical quantity.

How to use nth Tribonacci Number and understand its results

  1. Choose the required indexes, integers or sequence entries. Preserve decimal-string encodings where the field table specifies strings.
  2. Enter n according to the field table, then run the tool.
  3. Read value. Preserve exact decimal strings and the stated indexing or coefficient order.
  4. Keep exact decimal strings for subsequent integer arithmetic; distinguish them from any explicitly approximate numeric result.
Input fieldMeaningValue type and boundsRequirement
nZero-indexed term (resource limit 10000)integer; minimum 0; maximum 10000Required

Advance a three-value BigInt state from the stated initial values for n steps and return the first state value as a decimal string.

T(0)=0; T(1)=0; T(2)=1; T(n)=T(n−1)+T(n−2)+T(n−3)

The symbols and boundary conditions refer to the supplied fields and the implementation described above.

Output fieldMeaningValue type
valueTribonacci numberstring (integer/arbitrary)
json
{
  "input": {
    "n": 10
  },
  "output": {
    "value": "81"
  }
}

Limitations and assumptions

The index is zero-based and capped at 10000. Other Tribonacci initial conditions are not selectable.

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 Fibonacci Number when you need its operation: Return F(n) exactly as a decimal string with F(0)=0 and F(1)=1; the index is capped at 100,000 for bounded computation. Choose nth Padovan Number for the complementary operation: 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.

Background reference: OEIS A000073.

References

  1. OEIS A000073 — OEIS Foundation

Similar or alternative tools

  • nth Fibonacci Number

    Return F(n) exactly as a decimal string with F(0)=0 and F(1)=1; the index is capped at 100,000 for bounded computation.

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

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies