OEIS/Square Root Recurrences: Difference between revisions
Jump to navigation
Jump to search
imported>Gfis Order 2 |
imported>Gfis m Mathar from arxiv.org |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
Richard J.. Mathar wrote a '''[https://arxiv.org/abs/2109.02112 detailled paper]''' on this topic. | |||
===Examples=== | ===Examples=== | ||
====1 / Sqrt(1 - 2*b*x + d*x^2)==== | ====1 / Sqrt(1 - 2*b*x + d*x^2)==== | ||
Cf. [https://cs.uwaterloo. | Cf. [https://cs.uwaterloo.a/journals/JIS/VOL9/Noe/noe35.pdf Noe], equation (4): | ||
[https://oeis.org/A098455 A098455]: b=2; d=-36; | [https://oeis.org/A098455 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}] | 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}] | ||
Line 7: | Line 8: | ||
make runholo OFFSET=0 MATRIX="[[0],[36,-36],[2,-4],[0,1]]" INIT="[1,2]" | 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); | new HolonomicRecurrence(0, "[[0],[-d,d],[b,-2*b],[0,1]]", "[1,b]", 0); | ||
===[https://oeis.org/A002426 A002426] Central trinomial coefficients === | |||
Get["SpecialFunctions.m"] (* from Wolfram Koepf, Kassel *) | |||
gf=1/(1 - 2*x - 3*x^2)^(1/2); | |||
de=HolonomicDE[gf,x] | |||
re=DEtoRE[de,f[x],a[k]] | |||
RecurrenceTable[{re,a[0]==1,a[1]==1},a,{k,0,20}] | |||
(* Out[45]= (1 + 3 x) f[x] + (1 + x) (-1 + 3 x) f'[x] == 0 | |||
Out[46]= 3 (1 + k) a[k] + (3 + 2 k) a[1 + k] - (2 + k) a[2 + k] == 0 | |||
{1, 1, 3, 7, 19, 51, 141, 393, 1107, 3139, 8953, 25653, 73789, 212941, ... *) | |||
===Order 1=== | ===Order 1=== | ||
f = [1/Sqrt[1-b*x],x]] a(0) = 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 | 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 | (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 | (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/ | (105*b^4)/(16*(1 - b*x)^(9/2)) a(4) = 3*5*7/16*b^4 / 4! | ||
=> '''2*n*a(n) - | => '''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) | ||
-(-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)) | ||
(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) | ||
(-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)) | ||
(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) | ||
= | |||
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 |
Latest revision as of 09:58, 14 May 2022
Richard J.. Mathar wrote a detailled paper on this topic.
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);
A002426 Central trinomial coefficients
Get["SpecialFunctions.m"] (* from Wolfram Koepf, Kassel *) gf=1/(1 - 2*x - 3*x^2)^(1/2); de=HolonomicDE[gf,x] re=DEtoRE[de,f[x],a[k]] RecurrenceTable[{re,a[0]==1,a[1]==1},a,{k,0,20}] (* Out[45]= (1 + 3 x) f[x] + (1 + x) (-1 + 3 x) f'[x] == 0 Out[46]= 3 (1 + k) a[k] + (3 + 2 k) a[1 + k] - (2 + k) a[2 + k] == 0 {1, 1, 3, 7, 19, 51, 141, 393, 1107, 3139, 8953, 25653, 73789, 212941, ... *)
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