OFFSET
0,2
COMMENTS
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
FORMULA
From G. C. Greubel, Oct 13 2023: (Start)
a(n) = 2*(1 + (-1)^n)*binomial(n, n/2) - 3*(-1)^n.
G.f.: 2/sqrt(1-4*x^2) - 3/(1+x).
E.g.f.: 4*BesselI(0, 2*x) - 3*exp(-x). (End)
EXAMPLE
First few terms of the sequence are (1, 3, 5, 3, 21, 3, 77, ...), since A134770 = (1, 3, 5, 21, 77, ...).
MATHEMATICA
Table[If[OddQ[n], 3, 4*Binomial[n, n/2] -3], {n, 0, 50}] (* G. C. Greubel, Oct 13 2023 *)
PROG
(Magma)
A134771:= func< n | (n mod 2) eq 1 select 3 else 2*(n+2)*Catalan(Floor(n/2))-3 >;
[A134771(n): n in [0..50]]; // G. C. Greubel, Oct 13 2023
(SageMath)
def A134771(n): return 4*((n+1)%2)*binomial(n, n//2) - 3*(-1)^n
[A134771(n) for n in range(41)] # G. C. Greubel, Oct 13 2023
CROSSREFS
KEYWORD
nonn,easy,less
AUTHOR
Gary W. Adamson, Nov 10 2007
EXTENSIONS
Name changed by G. C. Greubel, Oct 13 2023
STATUS
approved