       trouble with a Binet in a generalized Pell recursion

• To: mathgroup at smc.vnet.net
• Subject: [mg106473] trouble with a Binet in a generalized Pell recursion
• From: Roger Bagula <roger.bagula at gmail.com>
• Date: Thu, 14 Jan 2010 05:46:14 -0500 (EST)

```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][]
a0 = x /. Solve[x^2 - a*x - 1 == 0, x][]
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][]]], {n, 0, 10}, {a, 1, 11}]
Table[FullSimplify[ExpandAll[v2[n, a][]]], {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 :