login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
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

%I #15 Nov 10 2017 08:39:33

%S 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,

%T 507,417,924,728,1652,1341,2993,2380,5373,4334,9707,7753,17460,14041,

%U 31501,25213,56714,45542,102256,81927,184183,147798,331981,266110,598091,479779,1077870,864201,1942071,1557649

%N 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.

%H Colin Barker, <a href="/A265755/b265755.txt">Table of n, a(n) for n = 0..1000</a>

%H <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (0,1,0,2,0,-1).

%F From _Colin Barker_, Dec 16 2015: (Start)

%F a(n) = a(n-2) + 2*a(n-4) - a(n-6) for n>5.

%F G.f.: x^3*(1+x-x^2) / (1-x^2-2*x^4+x^6).

%F (End)

%e a(8) = a(7) + a(6)

%e = a(4) + a(3) + a(5) + a(4)

%e = (a(3) + a(2)) + a(3) + (a(2) + a(1)) + (a(3) + a(2))

%e = 1 + 1 + 0 + 1

%e = 3

%t 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 *)

%t 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 *)

%o (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

%Y Interleaves A006053 and A052547, with an extra leading 0.

%Y A187066 with even values and odd values swapped and an extra leading 0.

%K nonn,easy

%O 0,8

%A _Nicholas Drozd_, Dec 15 2015

%E More terms from _Michael De Vlieger_, Dec 15 2015

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 13:29 EDT 2024. Contains 371780 sequences. (Running on oeis4.)