The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A265755 a(n) = a(n-1) + a(n-2) if n is even and a(n) = a(n-3) + a(n-4) if n is odd, with a(0) = a(1) = a(2) = 0 and a(3) = 1. 1
 0, 0, 0, 1, 1, 0, 1, 2, 3, 1, 4, 5, 9, 5, 14, 14, 28, 19, 47, 42, 89, 66, 155, 131, 286, 221, 507, 417, 924, 728, 1652, 1341, 2993, 2380, 5373, 4334, 9707, 7753, 17460, 14041, 31501, 25213, 56714, 45542, 102256, 81927, 184183, 147798, 331981, 266110, 598091, 479779, 1077870, 864201, 1942071, 1557649 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,8 LINKS Colin Barker, Table of n, a(n) for n = 0..1000 Index entries for linear recurrences with constant coefficients, signature (0,1,0,2,0,-1). FORMULA From Colin Barker, Dec 16 2015: (Start) a(n) = a(n-2) + 2*a(n-4) - a(n-6) for n>5. G.f.: x^3*(1+x-x^2) / (1-x^2-2*x^4+x^6). (End) EXAMPLE a(8) = a(7) + a(6)      = a(4) + a(3) + a(5) + a(4)      = (a(3) + a(2)) + a(3) + (a(2) + a(1)) + (a(3) + a(2))      = 1 + 1 + 0 + 1      = 3 MATHEMATICA a[0] = a[1] = a[2] = 0; a[3] = 1; a[n_] := a[n] = If[EvenQ@ n, a[n - 1] + a[n - 2], a[n - 3] + a[n - 4]]; Table[a@ n, {n, 0, 55}] (* Michael De Vlieger, Dec 15 2015 *) nxt[{n_, a_, b_, c_, d_}]:={n+1, b, c, d, If[OddQ[n], c+d, a+b]}; NestList[nxt, {1, 0, 0, 0, 1}, 60][[All, 2]] (* or *) LinearRecurrence[{0, 1, 0, 2, 0, -1}, {0, 0, 0, 1, 1, 0}, 60] (* Harvey P. Dale, Nov 10 2017 *) PROG (PARI) concat(vector(3), Vec(x^3*(1+x-x^2)/(1-x^2-2*x^4+x^6) + O(x^70))) \\ Colin Barker, Dec 16 2015 CROSSREFS Interleaves A006053 and A052547, with an extra leading 0. A187066 with even values and odd values swapped and an extra leading 0. Sequence in context: A071517 A305433 A257681 * A330139 A046671 A178760 Adjacent sequences:  A265752 A265753 A265754 * A265756 A265757 A265758 KEYWORD nonn,easy AUTHOR Nicholas Drozd, Dec 15 2015 EXTENSIONS More terms from Michael De Vlieger, Dec 15 2015 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified April 3 01:31 EDT 2020. Contains 333195 sequences. (Running on oeis4.)