Question 1011947
-1,2,12,40,.......
<pre>
We find a recursion formula of the form:

{{{a[n+2]}}}{{{""=""}}}{{{p*a[n+1]+q*a[n]}}}, where {{{a[1]}}}{{{""=""}}}{{{-1}}} and {{{a[2]}}}{{{""=""}}}{{{2}}}

and where p and q are constants:

{{{a[1+2]}}}{{{""=""}}}{{{pa[1+1]+qa[1]}}}

{{{a[3]=pa[2]}}}{{{""=""}}}{{{qa[1]}}}

{{{12=p*(2)}}}{{{""=""}}}{{{q*(-1)}}}

{{{12}}}{{{""=""}}}{{{2p-q}}}

(1)   {{{2p-q}}}{{{""=""}}}{{{12}}}

{{{a[2+2]}}}{{{""=""}}}{{{pa[2+1]+qa[2]}}}

{{{a[4]=pa[3]+qa[2]}}}

{{{40}}}{{{""=""}}}{{{p*(12)+q*(2)}}}

{{{40}}}{{{""=""}}}{{{12p+2q}}}

Divide through by 2

{{{20}}}{{{""=""}}}{{{6p+q}}}

(2)   {{{6p+q}}}{{{""=""}}}{{{20}}}

Solve the system of equations (1) and (2)

{{{system(2p-q=12,6p+q=20)}}}

Add the two equations:

{{{8p}}}{{{""=""}}}{{{32}}}

{{{p}}}{{{""=""}}}{{{4}}}

substitute in (1)

(1)   {{{2p-q}}}{{{""=""}}}{{{12}}
      {{{2(4)-q}}}{{{""=""}}}{{{12}}
      {{{8-q}}}{{{""=""}}}{{{12}}}
      {{{-q}}}{{{""=""}}}{{{4}}}
      {{{q}}}{{{""=""}}}{{{-4}}}

So the recursion formula is

 {{{a[n+2]}}}{{{""=""}}}{{{pa[n+1]+qa[n]}}}, where {{{a[1]}}}{{{""=""}}}{{{-1}}} and {{{a[2]}}}{{{""=""}}}{{{2}}}

becomes

{{{a[n+2]}}}{{{""=""}}}{{{4a[n+1]-4a[n]}}}, where {{{a[1]}}}{{{""=""}}}{{{-1}}} and {{{a[2]}}}{{{""=""}}}{{{2}}}

or

{{{a[n+2]}}}{{{""=""}}}{{{4(a[n+1]-a[n])}}}, where {{{a[1]}}}{{{""=""}}}{{{-1}}} and {{{a[2]}}}{{{""=""}}}{{{2}}} 

Substitute n=1 as a check

{{{a[n+2]}}}{{{""=""}}}{{{4(a[n+1]-a[n])}}}
{{{a[1+2]}}}{{{""=""}}}{{{4(a[1+1]-a[1])}}}
{{{a[3]}}}{{{""=""}}}{{{4(a[2]-a[1])}}}
{{{a[3]}}}{{{""=""}}}{{{4((2)^""-(-1))}}}
{{{a[3]}}}{{{""=""}}}{{{4(2+1)}}}
{{{a[3]}}}{{{""=""}}}{{{4(3)}}}
{{{a[3]}}}{{{""=""}}}{{{12}}}

Substitute n=2 as a check

{{{a[n+2]}}}{{{""=""}}}{{{4(a[n+1]-a[n])}}}
{{{a[2+2]}}}{{{""=""}}}{{{4(a[2+1]-a[2])}}}
{{{a[4]}}}{{{""=""}}}{{{4(a[3]-a[2])}}}
{{{a[4]}}}{{{""=""}}}{{{4((12)^""-(2))}}}
{{{a[3]}}}{{{""=""}}}{{{4(12-2)}}}
{{{a[3]}}}{{{""=""}}}{{{4(10)}}}
{{{a[3]}}}{{{""=""}}}{{{40}}}

Substitute n=3:

{{{a[n+2]}}}{{{""=""}}}{{{4(a[n+1]-a[n])}}}
{{{a[3+2]}}}{{{""=""}}}{{{4(a[3+1]-a[3])}}}
{{{a[5]}}}{{{""=""}}}{{{4(a[4]-a[3])}}}
{{{a[5]}}}{{{""=""}}}{{{4((40)^""-(12))}}}
{{{a[3]}}}{{{""=""}}}{{{4(40-12)}}}
{{{a[3]}}}{{{""=""}}}{{{4(28)}}}
{{{a[3]}}}{{{""=""}}}{{{112}}}

Substitute n=4

{{{a[n+2]}}}{{{""=""}}}{{{4(a[n+1]-a[n])}}}
{{{a[4+2]}}}{{{""=""}}}{{{4(a[4+1]-a[4])}}}
{{{a[6]}}}{{{""=""}}}{{{4(a[5]-a[4])}}}
{{{a[6]}}}{{{""=""}}}{{{4((112)^""-(40))}}}
{{{a[6]}}}{{{""=""}}}{{{4(112-40)}}}
{{{a[6]}}}{{{""=""}}}{{{4(72)}}}
{{{a[6]}}}{{{""=""}}}{{{288}}}

So the sequence goes:

-1,2,12,40,112,288,704,1664,3840,8704,.......

Edwin</pre>