133Mathematics · Sequences and Series

Affine Recurrence and First Threshold

Affine Recurrence and First Threshold

Calculate a term and cumulative sum of an affine recurrence, or find its first threshold crossing from index zero.

  • 187 bytes
  • COMP mode
01

Worked examples

Example 1

Original exercise. For the recurrence indexed from n=0, find the requested term and sum, or the first admissible index within the stated search range. x₀=10; xₙ₊₁=2xₙ+3; n=3. x₃=?, Σ(j=0…3)xⱼ=?

Answer
x₃=101; Σ(j=0…3)xⱼ=183.
Standard solution (without a calculator)
  1. Substitute the conditions, solve the equations, then retain only values satisfying the stated domain.
  2. Equation: x₁=2×10+3=23; x₂=49; x₃=101.
  3. Calculation: Σ=10+23+49+101=183.
  4. Conclusion: x₃=101; Σ=183.
Do it on the calculator

Example 2

Original exercise. For the recurrence indexed from n=0, find the requested term and sum, or the first admissible index within the stated search range. x₀=0; xₙ₊₁=2xₙ+1; 0≤n≤10, n∈ℤ. min{n:xₙ≥15}=?

Answer
n_min=4; x₄=15.
Standard solution (without a calculator)
  1. Substitute the conditions, solve the equations, then retain only values satisfying the stated domain.
  2. Equation: xₙ+1=2ⁿ ⇒ xₙ=2ⁿ−1.
  3. Calculation: x₃=7<15; x₄=15.
  4. Conclusion: min n=4; x₄=15.
Do it on the calculator

Example 3

Original exercise. For the recurrence indexed from n=0, find the requested term and sum, or the first admissible index within the stated search range. x₀=0; xₙ₊₁=xₙ/2+5; 0≤n≤70, n∈ℤ. min{n:xₙ≥10}=?

Answer
{n∈ℤ:0≤n≤70,xₙ≥10}=∅.
Standard solution (without a calculator)
  1. Substitute the conditions, solve the equations, then retain only values satisfying the stated domain.
  2. Equation: 10−xₙ=10×2^(−n) ⇒ xₙ=10(1−2^(−n)).
  3. Calculation: 2^(−n)>0 ⇒ xₙ<10.
  4. Conclusion: ∅ (0≤n≤70).
Do it on the calculator
02

When to use it

Calculate a term and cumulative sum of an affine recurrence, or find its first threshold crossing from index zero.

Input order

  • A:x₀ → B:r → C:c → M:1 → D:n
  • A:x₀ → B:r → C:c → M:2 → Y:T → D:Nmax
  • Enter all fields again for every run. Blank EXE retains old memory; zero must be typed as 0EXE.

Results

  • xₙ → Σ(j=0…n)xⱼ
  • n → xₙ
  • All displayed values follow the output order below. A pause requires EXE; the final screen uses AC.

Conditions and limits

  • Enter x₀,r,c,M; mode 1 then asks n, while modes 2/3 ask T and Nmax. Mode 1 returns xₙ and x₀+…+xₙ; 2 searches xₙ≥T, 3 searches xₙ>T, including n=0. Use nonnegative integer n or Nmax. −1,−1 means no hit in the chosen range; −2,−2 means invalid mode or negative limit. A question’s first year corresponds to n=0; convert indices accordingly. This does not search cumulative sums. All seven variables and Ans are overwritten.
  • The finite precision and numeric range of the calculator limit very large, very small or nearly cancelling values.

Sign in to unlock the full programme

Checking access…

The programme code and appendix unlock together.

Checking access…

Sign in to unlock the full programme

Checking access…

The programme code and appendix unlock together.