Sylvester Sequence Term

Return the zero-indexed Sylvester term a(0)=2 and a(n)=a(n−1)(a(n−1)−1)+1 exactly, with an index limit of 15 to bound doubly exponential output growth.

Description

Sylvester’s sequence grows extremely quickly: each term is one more than the product of preceding terms.

Sylvester’s sequence grows extremely quickly: each term is one more than the product of preceding terms. Its recurrence gives an exact integer without explicitly multiplying the entire history.1

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

When to use Sylvester Sequence Term

Use this for the following task: Return the zero-indexed Sylvester term a(0)=2 and a(n)=a(n−1)(a(n−1)−1)+1 exactly, with an index limit of 15 to bound doubly exponential output growth. Use the input and output conventions below to reproduce the intended mathematical quantity.

How to use Sylvester Sequence Term 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 15)integer; minimum 0; maximum 15Required

Start at BigInt two and apply the recurrence n times. Return the resulting integer as a decimal string.

a(0)=2; a(n)=a(n−1)×(a(n−1)−1)+1

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

Output fieldMeaningValue type
valueSylvester sequence termstring (integer/arbitrary)
json
{
  "input": {
    "n": 5
  },
  "output": {
    "value": "3263443"
  }
}

Limitations and assumptions

The index is capped at 15 because output size grows roughly doubly exponentially. No Egyptian-fraction decomposition is constructed.

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 Fibonacci Number for the complementary 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.

Background reference: OEIS A000058.

References

  1. OEIS A000058 — 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 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.

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