|
[Date Index]
[Thread Index]
[Author Index]
Re: fibonacci question
- To: mathgroup at smc.vnet.net
- Subject: [mg119467] Re: fibonacci question
- From: David Bailey <dave at removedbailey.co.uk>
- Date: Sun, 5 Jun 2011 07:03:14 -0400 (EDT)
- References: <isd0r7$1m2$1@smc.vnet.net>
On 04/06/2011 11:19, olfa wrote:
> Hello Mathematica community,
>
> why FullSimplify[Fibonacci[cn] + Fibonacci[cn + 1]] is not simplified
> into Fibonacci[cn+2]?
> what mathematica function should I use to get this output?
>
> thank you very much for your help.
>
You cannot expect FullSimplify to use every mathematical fact in every
possible way.
If are working with Fibonacci, and need this simplification, one way is
to use a transformation rule:
Fibonacci[cn] + Fibonacci[cn +
1]/.Fibonacci[x_]+Fibonacci[y_]:>Fibonacci[y+1]/;y==x+1
Note that this is a bit more general, in that it will also spot
expressions like Fibonacci[cn-1] + Fibonacci[cn].
It doesn't depend on the order in which things are summed, and the sum
can contain other terms as well:
In[635]:= Fibonacci[cn-1] +
cn-1+Fibonacci[cn-2]/.Fibonacci[x_]+Fibonacci[y_]:>Fibonacci[y+1]/;y==x+1
Out[635]= -1 + cn + Fibonacci[cn]
David Bailey
http://www.dbaileyconsultancy.co.uk
Prev by Date:
plotting contours on a sphere
Next by Date:
Re: FindCurvePath causes a crash
Previous by thread:
Re: fibonacci question
Next by thread:
Re: fibonacci question
|