OEIS/Square Root Recurrences: Difference between revisions

From tehowiki
Jump to navigation Jump to search
imported>Gfis
Order 2
 
imported>Gfis
in general
Line 8: Line 8:
  new HolonomicRecurrence(0, "[[0],[-d,d],[b,-2*b],[0,1]]", "[1,b]", 0);
  new HolonomicRecurrence(0, "[[0],[-d,d],[b,-2*b],[0,1]]", "[1,b]", 0);
===Order 1===
===Order 1===
  f    = [1/Sqrt[1-b*x],x]]                  a(0) = 1           / 0!
  f    = [1/Sqrt[1-b*x],x]]                  a(0) = 1             / 0!
  df/dx = b/(2*(1 - b*x)^(3/2))              a(1) = b/2         / 1!
  df/dx = b/(2*(1 - b*x)^(3/2))              a(1) = b/2           / 1!
         (3*b^2)/(4*(1 - b*x)^(5/2))        a(2) = 3/4*b       / 2!
         (3*b^2)/(4*(1 - b*x)^(5/2))        a(2) = 3/4*b^2      / 2!
         (15*b^3)/(8*(1 - b*x)^(7/2))        a(3) = 3*5/8*b     / 3!
         (15*b^3)/(8*(1 - b*x)^(7/2))        a(3) = 3*5/8*b^3    / 3!
         (105*b^4)/(16*(1 - b*x)^(9/2))      a(4) = 3*5*7/2^4*b / 4!
         (105*b^4)/(16*(1 - b*x)^(9/2))      a(4) = 3*5*7/16*b^4  / 4!
  => '''2*n*a(n) - b*(2*n-1)*a(n-1) = 0'''
  => '''2*n*a(n) - (2*n-1)*b*a(n-1) = 0'''
===Order 2===
===Order 2===
  1/(1-b*x-c*x^2)^(1/2)
  1/(1-b*x-c*x^2)^(1/2)
=> 0! * a(0) = 1
  -(-b-2*c*x)/(2*(1-b*x-c*x^2)^(3/2))
  -(-b-2*c*x)/(2*(1-b*x-c*x^2)^(3/2))
=> 1! * a(1) = b/2
  (3*(-b-2*c*x)^2)/(4*(1-b*x-c*x^2)^(5/2))  
  (3*(-b-2*c*x)^2)/(4*(1-b*x-c*x^2)^(5/2))  
     + c/(1-b*x-c*x^2)^(3/2)
     + c/(1-b*x-c*x^2)^(3/2)
=> 2! * a(2) = 3*b^2/4 + c
  (-15*(-b-2*c*x)^3)/(8*(1-b*x-c*x^2)^(7/2))  
  (-15*(-b-2*c*x)^3)/(8*(1-b*x-c*x^2)^(7/2))  
     - (9*c*(-b-2*c*x))/(2*(1-b*x-c*x^2)^(5/2))
     - (9*c*(-b-2*c*x))/(2*(1-b*x-c*x^2)^(5/2))
=> 3! * a(3) = 15/8*b^3 + 9*b*c/2
  (105*(-b-2*c*x)^4)/(16*(1-b*x-c*x^2)^(9/2))  
  (105*(-b-2*c*x)^4)/(16*(1-b*x-c*x^2)^(9/2))  
     + (45*c*(-b-2*c*x)^2)/(2*(1-b*x-c*x^2)^(7/2))  
     + (45*c*(-b-2*c*x)^2)/(2*(1-b*x-c*x^2)^(7/2))  
     + (9*c^2)/(1-b*x-c*x^2)^(5/2)
     + (9*c^2)/(1-b*x-c*x^2)^(5/2)
  => 4! * a(4) = 105/16*b^4 + 45/2*b^2*c^2 + 9*c^2
 
  0! * a(0) = 1
1! * a(1) = 1/2*b                 
2! * a(2) = 1*3/4*b^2      + c        = 3/2*b*a(1) + c
3! * a(3) = 1*3*5/8*b^3    + 9/2*b*c
4! * a(4) = 1*3*5*7/16*b^4 + 45/2*b^2*c^2 + 9*c^2
=> '''1*(2*n-0)*a(n) - (2*n-1)*b*a(n-1) - (2*n-2)*c*a(n-2) = 0'''
a(1) = 1/2*b
a(2) = 3/2*b*a(1) + 2/2*c
a(3) = 5/2*b*a(2) + 4/2*b*c + 2/2*d
 
In general for g.f. =
  (1                      - c1*x              - c2*x^2    ...        - ck*x^k  )^(-1/2)
  1*(2*n-0)*a(n) - (2*n-1)*c1*a(n-1) - (2*n-2)*c2*a(n-2) ... - (2*n-k)*ck*a(n-k) = 0

Revision as of 08:39, 3 January 2020

Examples

1 / Sqrt(1 - 2*b*x + d*x^2)

Cf. Noe, equation (4):

A098455: b=2; d=-36; 
RecurrenceTable[{a[0]==1, a[1]==b, n*a[n]==(2*n-1)*b*a[n-1] - (n-1)*d*a[n-2]}, a[n], {n,0,8}]
-> 1, 2, 24, 128, 1096, 7632, 60864, 461568, 3648096
make runholo OFFSET=0 MATRIX="[[0],[36,-36],[2,-4],[0,1]]" INIT="[1,2]"
new HolonomicRecurrence(0, "[[0],[-d,d],[b,-2*b],[0,1]]", "[1,b]", 0);

Order 1

f     = [1/Sqrt[1-b*x],x]]                  a(0) = 1             / 0!
df/dx = b/(2*(1 - b*x)^(3/2))               a(1) = b/2           / 1!
        (3*b^2)/(4*(1 - b*x)^(5/2))         a(2) = 3/4*b^2       / 2!
        (15*b^3)/(8*(1 - b*x)^(7/2))        a(3) = 3*5/8*b^3     / 3!
        (105*b^4)/(16*(1 - b*x)^(9/2))      a(4) = 3*5*7/16*b^4  / 4!
=> 2*n*a(n) - (2*n-1)*b*a(n-1) = 0

Order 2

1/(1-b*x-c*x^2)^(1/2)
-(-b-2*c*x)/(2*(1-b*x-c*x^2)^(3/2))
(3*(-b-2*c*x)^2)/(4*(1-b*x-c*x^2)^(5/2)) 
    + c/(1-b*x-c*x^2)^(3/2)
(-15*(-b-2*c*x)^3)/(8*(1-b*x-c*x^2)^(7/2)) 
    - (9*c*(-b-2*c*x))/(2*(1-b*x-c*x^2)^(5/2))
(105*(-b-2*c*x)^4)/(16*(1-b*x-c*x^2)^(9/2)) 
    + (45*c*(-b-2*c*x)^2)/(2*(1-b*x-c*x^2)^(7/2)) 
    + (9*c^2)/(1-b*x-c*x^2)^(5/2)
0! * a(0) = 1
1! * a(1) = 1/2*b                   
2! * a(2) = 1*3/4*b^2      + c         = 3/2*b*a(1) + c
3! * a(3) = 1*3*5/8*b^3    + 9/2*b*c
4! * a(4) = 1*3*5*7/16*b^4 + 45/2*b^2*c^2 + 9*c^2
=> 1*(2*n-0)*a(n) - (2*n-1)*b*a(n-1) - (2*n-2)*c*a(n-2) = 0

a(1) = 1/2*b
a(2) = 3/2*b*a(1) + 2/2*c
a(3) = 5/2*b*a(2) + 4/2*b*c + 2/2*d

In general for g.f. =

 (1                      - c1*x              - c2*x^2    ...         - ck*x^k   )^(-1/2)
  1*(2*n-0)*a(n) - (2*n-1)*c1*a(n-1) - (2*n-2)*c2*a(n-2) ... - (2*n-k)*ck*a(n-k) = 0