MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Re: Analyzing sequences of fractions in Mathematica

  • To: mathgroup at smc.vnet.net
  • Subject: [mg93677] Re: [mg93643] Re: Analyzing sequences of fractions in Mathematica
  • From: "Eric W. Weisstein" <eww at wolfram.com>
  • Date: Fri, 21 Nov 2008 05:34:33 -0500 (EST)
  • References: <200811200955.EAA20567@smc.vnet.net>

Steve Luttrell wrote:
> Is your nice solution obtained using the "Integer Sequence Analysis" methods 
> that have just been added to Mathematica 7 
> (http://www.wolfram.com/products/mathematica/newin7/content/IntegerSequenceAnalysis/)?

I actually did it by finding the nice recurrence for the denominator 
myself, then using RSolve and simplifying a bit by hand.

But yes, in V7, you can use FindLinearRecurrence[Numerator[mysequence]] 
out of the box.

In[2]:= mysequence = {1/8, 3/16, 11/32, 17/64, 25/128, 59/256,
    147/512, 265/1024, 465/2048, 995/4096, 2171/8192, 4161/16384,
    7881/32768, 16203/65536, 33571/131072, 65977/262144, 129025/524288,
     260979/1048576, 529547/2097152, 1051505/4194304, 2083705/8388608,
    4186715/16777216, 8423091/33554432, 16796521/67108864,
    33466161/134217728, 67059203/268435456, 134443931/536870912};

In[3]:= FindLinearRecurrence[Numerator[mysequence]]
Out[3]= {2, -1, 2, 4, -8}

and then call RSolve on the linear recurrence generated from that kernel.

Or you can just use FindSequenceFunction directly:

In[6]:= FullSimplify[FindSequenceFunction[Numerator[mysequence]][n],
  n \[Element] Integers]

Out[6]= (2^(
    1 - n/2) (17 2^(3 n/2) Sqrt[1 + Sqrt[17]] (13 + 5 Sqrt[17]) +
      Sqrt[1 + Sqrt[
        17]] (85 +
         13 Sqrt[17]) (-I^n (-1 + Sqrt[17])^(n/2) + (1 + Sqrt[17])^(
         n/2)) Cos[(n \[Pi])/2] +
      Sqrt[2] (-I I^n (-1 + Sqrt[17])^(
          n/2) (-17 + 23 Sqrt[17]) - (1 + Sqrt[17])^(
          n/2) (323 + 75 Sqrt[17])) Sin[(n \[Pi])/2]))/(17 (1 + Sqrt[
      17])^(3/2) (9 + Sqrt[17]))

and with a bit of hand simplification, you get the result I posted.

So you can see that indeed V7 has some nice new functionality which can 
be quite useful for analyzing integer (and even polynomial in some 
cases) sequences.  I'm sure I will be using it quite often.

Eric


  • Prev by Date: Re: How to purge contents of Mathlink buffer after errors sent.
  • Next by Date: Re: Re: Creating a Banner for presentation
  • Previous by thread: Re: Analyzing sequences of fractions in Mathematica
  • Next by thread: Re: Analyzing sequences of fractions in Mathematica