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

MathGroup Archive 2010

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

Search the Archive

Re: trouble with a Binet in a generalized Pell recursion

  • To: mathgroup at smc.vnet.net
  • Subject: [mg106515] Re: [mg106473] trouble with a Binet in a generalized Pell recursion
  • From: Daniel Lichtblau <danl at wolfram.com>
  • Date: Fri, 15 Jan 2010 03:18:08 -0500 (EST)
  • References: <201001141046.FAA19694@smc.vnet.net>

Roger Bagula wrote:
> The Pell equations come from the recursion:
> a(n)=2*a(n-1)+a(n-2)
> with two different starting points:{0,1}, and {1,1}.
> I generalized that to:
> a(n)=a0*a(n-1)+a(n-2)
> 
> Three ( almost) different ways to do Pell recursions.
> 1) simple recursion
> 2) Binet root forms
> 3) Matrix Markov
> The Binet form for the second function type doesn't work.
> 
> The modulo two patterns are simple patterns  and not the fractals I
> was hoping for
> when I thought of this last night.
> 
> Mathematica:
> Clear[f, g, a, b, v1, v2, n, a0, b0, f1, g1]
> f[0, a_] := 0; f[1, a_] := 1;
> f[n_, a_] := f[n, a] = a*f[n - 1, a] + f[n - 2, a]
> g[0, a_] := 1; g[1, a_] := 1;
> g[n_, a_] := g[n, a] = a*g[n - 1, a] + g[n - 2, a]
> Table[f[n, a], {n, 0, 10}, {a, 1, 11}]
> Table[g[n, a], {n, 0, 10}, {a, 1, 11}]
> b0 = x /. Solve[x^2 - a*x - 1 == 0, x][[1]]
> a0 = x /. Solve[x^2 - a*x - 1 == 0, x][[2]]
> FullSimplify[a0 - b0]
> FullSimplify[a0 + b0]
> f1[n_, a_] := (a0^n - b0^n)/Sqrt[4 + a^2]
> g1[n_, a_] := (a0^n + b0^n)/a
> Table[FullSimplify[ExpandAll[f1[n, a]]], {n, 0, 10}, {a, 1, 11}]
> Table[FullSimplify[ExpandAll[g1[n, a]]], {n, 0, 10}, {a, 1, 11}]
> v1[n_, a_] = MatrixPower[{{0, 1}, {1, a}}, n].{0, 1}
> v2[n_, a_] = MatrixPower[{{0, 1}, {1, a}}, n].{1, 1}
> Table[FullSimplify[ExpandAll[v1[n, a][[1]]]], {n, 0, 10}, {a, 1, 11}]
> Table[FullSimplify[ExpandAll[v2[n, a][[1]]]], {n, 0, 10}, {a, 1, 11}]
> ListDensityPlot[Table[Mod[f[n, a], 2], {n, 0, 32}, {a, 1, 33}],
>     Mesh -> False]
> ListDensityPlot[Table[Mod[g[n, a], 2], {n, 0, 32}, {a, 1, 33}], Mesh -
>> False]
> 
> Respectfully, Roger L. Bagula
> 11759 Waterhill Road, Lakeside,Ca 92040-2905,tel: 619-5610814 :
> http://www.google.com/profiles/Roger.Bagula
> alternative email: roger.bagula at gmail.com
> 

Not sure if a question is being raised. This response is in regard to 
the remark "The Binet form for the second function type doesn't work." 
Your definition of g1 does not agree with the result of RSolve for g.

In[136]:= Together[
  Expand[g[n, a] /.
     RSolve[{g[n, a] == a*g[n - 1, a] + g[n - 2, a], g[0, a] == 1,
       g[1, a] == 1}, g[n, a], n]][[1]]]

Out[136]= (1/Sqrt[4 + a^2])2^(-1 -
   n) (-2 (a - Sqrt[4 + a^2])^n + a (a - Sqrt[4 + a^2])^n +
    Sqrt[4 + a^2] (a - Sqrt[4 + a^2])^n + 2 (a + Sqrt[4 + a^2])^n -
    a (a + Sqrt[4 + a^2])^n + Sqrt[4 + a^2] (a + Sqrt[4 + a^2])^n)

 From this I form what seems to be a corrected version.

g2[n_, a_] :=
  1/(2*Sqrt[4 + a^2])*((Sqrt[4 + a^2] + a - 2)*
      b0^n + (Sqrt[4 + a^2] - a + 2)*a0^n)

This appears to agree with your recursive definition for g[n,a].

Daniel Lichtblau
Wolfram Research





  • Prev by Date: Re: Labeling points on ListPlot - Transform string date element in
  • Next by Date: Re: Labeling points on ListPlot - Transform string date element in list of tripes
  • Previous by thread: trouble with a Binet in a generalized Pell recursion
  • Next by thread: Re: trouble with a Binet in a generalized Pell recursion