Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

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

Search the Archive

Re: Analyzing sequences of fractions in Mathematica

  • To: mathgroup at smc.vnet.net
  • Subject: [mg93526] Re: [mg93520] Analyzing sequences of fractions in Mathematica
  • From: "Eric W. Weisstein" <eww at wolfram.com>
  • Date: Thu, 13 Nov 2008 21:05:47 -0500 (EST)
  • References: <200811130904.EAA14027@smc.vnet.net>

sergio_r at mail.com wrote:

> Hello Mathematica users,
> 
> (* I am trying to infer, if possible, the general term
>    of the following sequence: *)
> 
> 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}

It can probably be simplified somewhat but here is one form of it:

seq[n_] := With[{
       a = 1/2 (-1 + Sqrt[17]), b = 1/2 (1 + Sqrt[17]),
       c = Sqrt[1/17 (-4 + Sqrt[17])], d = Sqrt[1/17 (4 + Sqrt[17])]
     },
     2^(-n - 2) Piecewise[{
       {2^n - a^(n/2)/Sqrt[17] + (I^n b^(n/2))/Sqrt[17], Mod[n, 2] == 0},
       {2^n + c a^(n/2) + I^(n + 1) d b^(n/2), Mod[n, 2] == 1}
    }]]

Table[seq[n], {n, 27}] // FullSimplify
{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}

% == mysequence
True

Cheers,
-Eric


  • Prev by Date: Re: Unacceptable bug in Mathematica
  • Next by Date: Re: Unacceptable bug in Mathematica
  • Previous by thread: Analyzing sequences of fractions in Mathematica
  • Next by thread: Re: Analyzing sequences of fractions in Mathematica