Skip to content

Instantly share code, notes, and snippets.

@pyrocat101
Created April 30, 2014 05:21
Show Gist options
  • Save pyrocat101/0a5d743b54211ec28eff to your computer and use it in GitHub Desktop.
Save pyrocat101/0a5d743b54211ec28eff to your computer and use it in GitHub Desktop.
Simplify[RSolve[{a[n] == (B + 1) a[n - 1] - a[n - 2], a[0] == 0, a[1] == B}, a[n], n]]
Block[{B = 2}, Simplify[Table[a[n] /. First[%], {n, 10}]]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment