OFFSET
1,2
LINKS
Andrew Howroyd, Table of n, a(n) for n = 1..100
Eric Weisstein's World of Mathematics, Barbell Graph
Eric Weisstein's World of Mathematics, Matching
Eric Weisstein's World of Mathematics, Maximal Independent Edge Set
FORMULA
a(2n) = 2*(2*n-1)!!^2, a(2n-1) = (2*n-1)!!^2. - Andrew Howroyd, Dec 30 2017
D-finite with recurrence: (n-3)*(n+1)*a(n) + (4*n-2)*a(n-1) - (n+2)*(n-2)*(n-1)^2*a(n-2) = 0. - Georg Fischer, Nov 25 2022
MATHEMATICA
Table[2^(n + 1) ((n - 1 + Mod[n, 2])/2)!^2/Pi, {n, 20}]
Table[2^(n + 1) ((2 Ceiling[n/2] - 1)/2)!^2/Pi, {n, 20}]
Table[If[Mod[n, 2] == 0, 2 (n - 1)!!^2, n!!^2], {n, 20}]
a[ n_] := If[n<0, 0, With[{t = Ceiling[n/2]}, (n+2-2*t)*((2*t)!/(2^t*t!))^2]]; (* Michael Somos, May 27 2023 *)
PROG
(PARI) \\ here b(n)=A001147(n)=(2*n-1)!!
b(n)={(2*n)!/(2^n*n!)}
a(n)=if(n%2, b((n+1)/2)^2, 2*b(n/2)^2); \\ Andrew Howroyd, Dec 30 2017
(PARI) {a(n) = if(n<1, 0, my(t = (n+1)\2); (n+2-2*t)*((2*t)!/(2^t*t!))^2)}; /* Michael Somos, May 27 2023 */
CROSSREFS
KEYWORD
nonn
AUTHOR
Eric W. Weisstein, Dec 30 2017
EXTENSIONS
a(1)-a(2) and terms a(21) and beyond from Andrew Howroyd, Dec 30 2017
STATUS
approved