Terms and index
a(n-1), a(n-2), … refer to earlier terms. Use n for the current integer index.
Forward references, a(n), and non-integer lags are not accepted.
Private by design: the recurrence and initial values are processed on this device. They are not uploaded, stored, or added to the page URL.
a(n-1), a(n-2), … refer to earlier terms. Use n for the current integer index.
Forward references, a(n), and non-integer lags are not accepted.
+ − * / % ^ ( )
Powers are evaluated before multiplication, then addition. Use parentheses whenever the intended order may be unclear.
Integers, decimals, and scientific notation such as 2.5e-3 are accepted. Constants: pi and e.
abs(x), sqrt(x), floor(x), ceil(x), round(x), exp(x), ln(x), log10(x), min(x,y), and max(x,y).
aₙ = F(n, aₙ₋₁, …, aₙ₋ₖ)
The rule defines a new term from its index and one or more earlier terms.
aₙ₀, aₙ₀₊₁, …, aₙ₀₊ₖ₋₁
At least k consecutive starting values are required when the largest lag is k.
n = n₀ + k, n₀ + k + 1, …
The calculator moves forward one index at a time, making each calculated term available to the next step.
A recurrence determines a unique forward sequence only after sufficient initial conditions are supplied. This calculator checks that every backward reference is available when the first calculated term is evaluated.
With a(n) = a(n-1) + a(n-2), a(0) = 0, and a(1) = 1, the sequence begins 0, 1, 1, 2, 3, 5, 8, ….
With a(n) = 3a(n-1) and a(0) = 2, enter 3 * a(n-1) to generate 2, 6, 18, 54, ….
With a(0) = 1 and a(n) = n·a(n-1), enter n * a(n-1) to generate factorials. The value of n always matches the index shown in the result table.
The parser accepts only the documented numbers, constants, term references, operators, parentheses, and functions. It does not execute JavaScript or arbitrary code. References must have the exact backward form a(n-k), where k is a positive integer no greater than 50. The first index must be an integer from −1,000,000 through 1,000,000.
The tool generates no more than 500 total terms from at most 50 initial values. It stops with an index-specific error if a calculation divides by zero, uses a function outside its real-number domain, or produces NaN or infinity. The remainder operator % follows JavaScript’s remainder convention, so a negative dividend can produce a negative remainder.
Calculations use IEEE 754 double-precision floating-point numbers. Table values are displayed with up to 12 significant digits, while copied and downloaded values use JavaScript’s round-trip numeric representation. Large integers beyond 2⁵³ − 1 and many decimal fractions may not be exact. This is a numerical sequence generator, not a symbolic solver: it does not derive closed forms, solve for unknown coefficients, or prove convergence.
Calculation note: the implementation follows the defining forward-iteration rule for recurrence relations and checks each example against its stated initial conditions. Last reviewed: .
A recurrence relation defines each new term of a sequence using its index and one or more earlier terms. Initial values provide the starting information needed to apply that rule.
Enter a(n-1) + a(n-2) as the recurrence, enter 0, 1 as the initial values, set the first index to 0, and choose the desired total number of terms.
You need at least as many consecutive initial values as the largest backward reference. For example, a recurrence containing a(n-3) needs at least three initial values so that reference exists at the first calculation.
Yes. Use n anywhere in the formula, such as a(n-1) + n. The first calculated term uses the integer index immediately after the final initial value.
Yes. Decimal and scientific-notation numbers, division, constants, and the documented functions are supported. Results use floating-point arithmetic and may be rounded for display.
The tool stops if a formula divides by zero, takes a square root or logarithm outside its real-number domain, or grows beyond the finite numeric range. The validation message identifies the affected index.
No. It iterates the recurrence numerically to generate terms. It does not derive a symbolic closed-form expression, solve characteristic equations, or prove convergence.
No. Formula parsing, sequence generation, copying, and CSV creation happen locally in your browser. The tool does not transmit or save entered values.