       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:= 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:= FindLinearRecurrence[Numerator[mysequence]]
Out= {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:= FullSimplify[FindSequenceFunction[Numerator[mysequence]][n],
n \[Element] Integers]

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

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