# HP Forums

Full Version: Solving a Recursive Sequence in Sequence App
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello. Can anyone tell me how I would solve a recursive sequence in the sequence app on the HP Prime? An example of what I am trying to solve is
U(1)=3
U(N)=2*U(n-1)+3
(11-20-2014 09:56 PM)maxlockett619 Wrote: [ -> ]Hello. Can anyone tell me how I would solve a recursive sequence in the sequence app on the HP Prime? An example of what I am trying to solve is
U(1)=3
U(N)=2*U(n-1)+3
what do you mean by "solve" ? the sequence app is more to "study" sequences.

did you try to type your formula in Symb screen ?
U1(1)=3
U1(N)=2*U1(n-1)+3
(11-20-2014 10:40 PM)patrice Wrote: [ -> ]what do you mean by "solve" ?

Probably finding the explicit formula: $$U(n)=3(2^n-1)$$
Thanks for the replies. That solved my problems. In addition, do you know of any apps that you can download where you can input a sequence and be given a rule back? Thanks.
You can solve somes recurrences in CAS with the rsolve command.
[un]:=rsolve([u(n)=2*u(n-1)+3,u(1)=3],u(n));
factor(un)
(11-21-2014 01:48 AM)maxlockett619 Wrote: [ -> ]Thanks for the replies. That solved my problems. In addition, do you know of any apps that you can download where you can input a sequence and be given a rule back? Thanks.

I often "cheat" by looking it up in the Online Encyclopedia of Integer Sequences. Just type in a section of any sequence, and it identifies it, usually in both recursive and direct forms (jump down the page to the "FORMULA" section). Very cool, especially when the relationship between the recursive and direct formulae is utterly mysterious.

Caution: Browsing OEIS is known to be addictive.
Quote:(…) where you can input a sequence and be given a rule back?

For polynomial sequences you can apply the forward difference operator $$\Delta$$ consecutively until you get just 0s.
For the tetrahedral numbers we get:
$\begin{matrix} U &: & {\color{Red} 0} & & 1 & & 4 & & 10 & & 20 & & 35 & & 56 & & \cdots \\ \Delta U &: & & {\color{Red} 1} & & 3 & & 6 & & 10 & & 15 & & 21 & & \cdots & \\ \Delta^2 U &: & & & {\color{Red} 2} & & 3 & & 4 & & 5 & & 6 & & \cdots & & \\ \Delta^3 U &: & & & & {\color{Red} 1} & & 1 & & 1 & & 1 & & \cdots & & & \\ \Delta^4 U &: & & & & & {\color{Red} 0} & & 0 & & 0 & & \cdots & & & & \\ \cdots &: & & & & & & & \cdots \end{matrix}$

Then use Newton's forward difference formula to write the sequence as a sum of binomial coefficients:

$$U(n)=0\binom{n}{0}+1\binom{n}{1}+2\binom{n}{2}+1\binom{n}{3}$$

Cheers
Thomas
Hey,

I know this is off topic, but are there GBA games for this just like how there are GBA games on the N-Spire? (Pokemon, mainly)
Nope, no GBA games on the Prime.
There are very few developers interested in low-level programming for the Prime, which is sad, as the Prime is an open platform, unlike the Nspire, and the Prime is powerful.
Even though the Prime has half of the RAM of the '2011 Nspire CX, the Prime's processor is clocked three times higher, which makes the Prime the calculator with the least underpowered processor on the market.
Reference URL's
• HP Forums: https://www.hpmuseum.org/forum/index.php
• :