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!)
 A174562 a(1)=2, a(2)=3, then a(n)=a(n-1)+a(n-2) if n odd, a(n)=a(n-1)-a(n-2) if n even. 2
 2, 3, 5, 2, 7, 5, 12, 7, 19, 12, 31, 19, 50, 31, 81, 50, 131, 81, 212, 131, 343, 212, 555, 343, 898, 555, 1453, 898, 2351, 1453, 3804, 2351, 6155, 3804, 9959, 6155, 16114, 9959, 26073, 16114, 42187, 26073, 68260, 42187, 110447, 68260, 178707, 110447 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 LINKS Harvey P. Dale, Table of n, a(n) for n = 1..1000 Index entries for linear recurrences with constant coefficients, signature (0,1,0,1). FORMULA a(n)= a(n-2) +a(n-4). G.f.: x*(-2-3*x-3*x^2+x^3)/(-1+x^2+x^4). a(2n+1) = A001060(n). a(2n) = A013655(n-1). [From R. J. Mathar, Apr 14 2010] a(n)=x(n) = -1/4 * (1/2 + 1/2 * sqrt(5))^(1/2 * n) * (1/2 + 1/2 * sqrt(5))^(1/4 * (-1)^n) * (-1)^n * (1/2 + 1/2 * sqrt(5))^(-1/4) + 9/20 * (1/2 + 1/2 * sqrt(5))^(1/2 * n) * (1/2 + 1/2 * sqrt(5))^(1/4 * (-1)^n) * (1/2 + 1/2 * sqrt(5))^(-1/4) * sqrt(5) + 5/4 * (1/2-1/2 * sqrt(5))^(-1/4) * (1/2-1/2 * sqrt(5))^(1/2 * n) * (1/2-1/2 * sqrt(5))^(1/4 * (-1)^n)-9/20 * (1/2-1/2 * sqrt(5))^(-1/4) * (1/2-1/2 * sqrt(5))^(1/2 * n) * (1/2-1/2 * sqrt(5))^(1/4 * (-1)^n) * sqrt(5)-1/4 * (-1)^n * (1 /2-1/2 * sqrt(5))^(-1/4) * (1/2-1/2 * sqrt(5))^(1/2 * n) * (1/2-1/2 * sqrt(5))^(1/4 * (-1)^n) + 5/4 * (1/2 + 1/2 * sqrt(5))^(1/2 * n) * (1/2 + 1/2 * sqrt(5))^(1/4 * (-1)^n) * (1/2 + 1/2 * sqrt(5))^(-1/4)-7/20 * (-1)^n * (1/2-1/2 * sqrt(5))^(-1/4) * (1/2-1/2 * sqrt(5))^(1/2 * n) * (1/2-1/2 * sqrt(5))^(1/4 * (-1)^n) * sqrt(5) + 7/20 * (1/2 + 1/2 * sqrt(5))^(1/2 * n) * (1/2 + 1/2 * sqrt(5))^(1/4 * (-1)^n) * (-1)^n * (1/2 + 1/2 * sqrt(5))^(-1/4) * sqrt(5), with n>=0 [From Paolo P. Lava, Apr 23 2010] MATHEMATICA nxt[{n_, a_, b_}]:={n+1, b, If[EvenQ[n], b-a, b+a]}; Transpose[ NestList[ nxt, {1, 2, 3}, 50]][[2]] (* or *) LinearRecurrence[{0, 1, 0, 1}, {2, 3, 5, 2}, 51] (* Harvey P. Dale, Jan 06 2012 *) CROSSREFS Sequence in context: A096062 A176195 A231233 * A224382 A069227 A117368 Adjacent sequences:  A174559 A174560 A174561 * A174563 A174564 A174565 KEYWORD easy,nonn AUTHOR Giovanni Teofilatto, Mar 22 2010 EXTENSIONS a(44) corrected by R. J. Mathar, Apr 14 2010 Precise definition from R. J. Mathar, Aug 23 2010 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 September 20 09:44 EDT 2021. Contains 347583 sequences. (Running on oeis4.)