Recover a Sequence from Two Terms
Recover a Sequence from Two Terms
From two known terms recover the first term and common difference or positive ratio, then find the requested term and sum.
- 287 bytes
- COMP mode
Worked examples
Example 1
Original practice. From two known terms recover the first term and common difference or positive ratio, then find the requested term and sum. M=1; u₂=16; u₅=31; n=12. a=?,d=?,u₁₂=?,S₁₂=?
Answer
Standard solution (without a calculator)
- d=(31−16)/(5−2)=5; a=16−5=11
- u₁₂=11+11×5=66; S₁₂=12(11+66)/2=462
- Expand or substitute to verify each equality above.
Example 2
Original practice. From two known terms recover the first term and common difference or positive ratio, then find the requested term and sum. M=2; r>0; u₂=6; u₅=48; n=7. a=?,r=?,u₇=?,S₇=?
Answer
Standard solution (without a calculator)
- r³=48/6=8; r>0 ⇒ r=2; a=6/2=3
- u₇=3×2⁶=192; S₇=3(2⁷−1)=381
- Expand or substitute to verify each equality above.
Example 3
Original practice. From two known terms recover the first term and common difference or positive ratio, then find the requested term and sum. M=2; r>0; u₂=−2; u₄=−1/2; n=6. a=?,r=?,u₆=?,S₆=?
Answer
Standard solution (without a calculator)
- r²=(−1/2)/(−2)=1/4; r>0 ⇒ r=1/2; a=−2/(1/2)=−4
- u₆=−4(1/2)⁵=−1/8; S₆=−4[1−(1/2)⁶]/(1−1/2)=−63/8
- Expand or substitute to verify each equality above.
When to use it
From two known terms recover the first term and common difference or positive ratio, then find the requested term and sum.
Input order
- M,p,uₚ,q,u_q,n
- M∈{1,2}; A=p→a; B=uₚ; C=q→uₙ; D=u_q→d/r; X=n; Y=n ln(r)/2
- M∈{1,2}; p,q,n∈ℤ; 1≤p<q≤1000000; 1≤n≤1000000; M=2: r>0,uₚu_q>0; −3
- Fill every field explicitly, including 0. Blank EXE uses the current memory value; clearing memory makes it 0, but cannot detect omissions. All variables and Ans are overwritten.
Output order
- a,d/r,uₙ,Sₙ; −3
- Two-term geometric recovery uses only the positive ratio, with nonzero known terms of the same sign. It does not enumerate negative-ratio alternatives.
Conditions and limits
- Use COMP and Norm 1; the images use Deg, which does not change this algebra.
- All intermediate values must remain within calculator range. Decimal outputs are approximations. Check nearly equal values with exact algebra; an error or overflow invalidates the whole run.
- Two-term geometric recovery uses only the positive ratio, with nonzero known terms of the same sign. It does not enumerate negative-ratio alternatives.
- After the final screen press AC. An extra EXE starts a new run; it does not reveal another result.
Checking access…