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!)
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

%I #20 Dec 23 2023 16:43:01

%S 2,3,5,2,7,5,12,7,19,12,31,19,50,31,81,50,131,81,212,131,343,212,555,

%T 343,898,555,1453,898,2351,1453,3804,2351,6155,3804,9959,6155,16114,

%U 9959,26073,16114,42187,26073,68260,42187,110447,68260,178707,110447

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

%H Harvey P. Dale, <a href="/A174562/b174562.txt">Table of n, a(n) for n = 1..1000</a>

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

%F 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]

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

%K nonn,easy

%O 1,1

%A _Giovanni Teofilatto_, Mar 22 2010

%E a(44) corrected by _R. J. Mathar_, Apr 14 2010

%E Precise definition from _R. J. Mathar_, Aug 23 2010

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 19 18:05 EDT 2024. Contains 371798 sequences. (Running on oeis4.)