OFFSET
0,4
LINKS
FORMULA
a(n+3)/2 = A024495(n+2). - corrected by Vladimir Shevelev, Aug 08 2017
a(n) = 0^n + Sum{k=0..floor((n-1)/3)} C(n-1, 3*k+2).
a(n) = Sum{k=0..n} C(n, k)(-1)^mod(k, 3).
G.f.: (1 - 3*x + 3*x^2)/((1 - 2*x)*(1 - x + x^2)). - Paul Barry, Dec 14 2004
From Vladimir Shevelev, Aug 02 2017: (Start)
a(n) = A024495(n) if and only if n == 1 (mod 3);
a(n) = A024495(n) - 1 if and only if n == 2 or 3 (mod 6);
a(n) = A024495(n) + 1 if and only if n == 0 or 5 (mod 6);
a(3*k+1) = 2*A024495(3*k). (End)
a(n) = A131370(n+1)/2. - Rick L. Shepherd, Aug 02 2017
3*a(n) = 2^n + 2*A057079(n+2). - R. J. Mathar, Aug 04 2017
MATHEMATICA
Join[{1, a = 0, b = 0}, Table[c = 2^n - a + b; a = b; b = c, {n, 1, 100}]] (* Vladimir Joseph Stephan Orlovsky, Jun 28 2011 *)
LinearRecurrence[{3, -3, 2}, {1, 0, 0}, 40] (* Harvey P. Dale, Aug 02 2017 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Barry, Jul 25 2003
STATUS
approved