OFFSET
1,1
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
Mircea Merca, A Note on Cosine Power Sums J. Integer Sequences, Vol. 15 (2012), Article 12.5.3.
FORMULA
a(n) = Sum_{k=0..floor(n/3)} (-1)^k*C(2*n, n-3*k).
G.f.: ((x-1)*(4*x-1) + sqrt((1-4*x)*(3*x-1)^2))/(2*(4*x-1)*(3*x-1)) - 1.
Conjecture: n*(n-3)*a(n) - (7*n^2 -23*n +12)*a(n-1) +6*(2*n-3)*(n-2)*a(n-2)=0. - R. J. Mathar, Oct 18 2017
EXAMPLE
a(5) = 3^4 + C(10,5)/2 = 81 + 126 = 207.
MAPLE
seq(3^(n-1)+binomial(2*n-1, n), n=1..20)
MATHEMATICA
Table[3^(n-1)+Binomial[2n, n]/2, {n, 30}] (* Harvey P. Dale, Dec 27 2011 *)
PROG
(PARI) a(n)=3^(n-1)+binomial(n+n, n)/2 \\ Charles R Greathouse IV, Jun 21 2011
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Mircea Merca, Jun 21 2011
STATUS
approved