OFFSET
0,6
REFERENCES
D. E. Knuth, The Art of Computer Programming, Vol. 4A, Section 7.1.4.
LINKS
Robert Israel, Table of n, a(n) for n = 0..4329
V. C. Harris, C. C. Styles, A generalization of Fibonacci numbers, Fib. Quart. 2 (1964) 277-289, sequence u(n,2,3).
Index entries for linear recurrences with constant coefficients, signature (3,-3,1,0,1).
FORMULA
Let A_n = Sum_{k<=n/2}binomial(n-2k,3k) (the present sequence), B_n= Sum_{k<=n/2}binomial(n-2k, 3k+1)(A137357), C_n= Sum_{k<=n/2}binomial(n-2k, 3k+2) (A137358).
Then A_n = A_{n-1} + C_{n-3} + \delta_{n0}, B_n=B_{n-1} + A_{n-1}, C_n=C_{n-1} + B_{n-1};
so the generating functions are A = (1-z)^2/p(z), B=z(1-z)/p(z), C=z^2/p(z),
where p(z) = (1-z)^3 - z^5 = 1 - 3z + 3z^2 - z^3 - z^5.
The growth ratio is the real root of r^2(r-1)^3 = 1, approximately 1.70161.
a(n) = 3*a(n-1)-3*a(n-2)+a(n-3)+a(n-5). - Vincenzo Librandi, Aug 09 2015
a(n) = hypergeom([-(1/5)*n, -(1/5)*n+1/5, 2/5-(1/5)*n, 3/5-(1/5)*n, -(1/5)*n+4/5], [1/3, 2/3, -(1/2)*n, -(1/2)*n+1/2], -3125/108). - Robert Israel, May 26 2017
G.f.: -(x-1)^2/(-1+3*x-3*x^2+x^3+x^5) . - R. J. Mathar, May 29 2017
MAPLE
f:= gfun:-rectoproc({a(n) = 3*a(n-1)-3*a(n-2)+a(n-3)+a(n-5), seq(a(i)=1, i=0..4)}, a(n), remember):
map(f, [$0..50]); # Robert Israel, May 26 2017
MATHEMATICA
LinearRecurrence[{3, -3, 1, 0, 1}, {1, 1, 1, 1, 1}, 50] (* Vincenzo Librandi, Aug 09 2015 *)
CoefficientList[Series[(1-x)^2/(1 - 3 x + 3 x^2 - x^3 - x^5), {x, 0, 40}], x] (* Vaclav Kotesovec, Aug 09 2015 *)
Table[Sum[Binomial[n-2k, 3k], {k, 0, n/2}], {n, 0, 50}] (* Harvey P. Dale, Nov 07 2021 *)
PROG
(Magma) I:=[1, 1, 1, 1, 1]; [n le 5 select I[n] else 3*Self(n-1)-3*Self(n-2)+Self(n-3)+Self(n-5): n in [1..45]]; // Vincenzo Librandi, Aug 09 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Don Knuth, Apr 11 2008
STATUS
approved