The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A163495 a(0)=0, a(1)=1, a(2)=2. For n >= 3, a(n) = a(n-1) - min(a(n-2), a(n-3)). 1

%I #18 Apr 07 2018 15:23:02

%S 0,1,2,2,1,-1,-2,-1,1,3,4,3,0,-3,-3,0,3,6,6,3,-3,-6,-3,3,9,12,9,0,-9,

%T -9,0,9,18,18,9,-9,-18,-9,9,27,36,27,0,-27,-27,0,27,54,54,27,-27,-54,

%U -27,27,81,108,81,0,-81,-81,0,81,162,162,81,-81,-162,-81,81,243,324,243,0

%N a(0)=0, a(1)=1, a(2)=2. For n >= 3, a(n) = a(n-1) - min(a(n-2), a(n-3)).

%C a(n+15) = 3*a(n) for all n. - Dion Gijswijt (gijswijt(AT)science.uva.nl) Jul 29 2009 on SeqFan mailing list.

%H A. Karttunen, <a href="/A163495/b163495.txt">Table of n, a(n) for n=0..224</a>

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

%F G.f. x*(1 +2*x +2*x^2 +x^3 -x^4 -2*x^5 -x^6 +x^7 +3*x^8 +4*x^9 +3*x^10 -3*x^12 -3*x^13) / (1 - 3*x^15 ). - _R. J. Mathar_, Jun 22 2011

%p a[0] := 0: a[1] := 1: a[2] := 2: for n from 3 to 80 do a[n] := a[n-1]-min(a[n-2], a[n-3]) end do: seq(a[n], n = 0 .. 80); # _Emeric Deutsch_, Aug 01 2009

%t CoefficientList[Series[x*(1 +2*x +2*x^2 +x^3 -x^4 -2*x^5 -x^6 +x^7 +3*x^8 +4*x^9 +3*x^10 -3*x^12 -3*x^13)/(1 - 3*x^15 ), {x, 0, 50}], x] (* _G. C. Greubel_, Jul 26 2017 *)

%t nxt[{a_,b_,c_}]:={b,c,c-Min[a,b]}; NestList[nxt,{0,1,2},80][[All,1]] (* or *) LinearRecurrence[{0,0,0,0,0,0,0,0,0,0,0,0,0,0,3},{0,1,2,2,1,-1,-2,-1,1,3,4,3,0,-3,-3},80] (* _Harvey P. Dale_, Apr 07 2018 *)

%o (PARI) x='x+O('x^50); concat([0], Vec(x*(1 +2*x +2*x^2 +x^3 -x^4 -2*x^5 -x^6 +x^7 +3*x^8 +4*x^9 +3*x^10 -3*x^12 -3*x^13)/(1 - 3*x^15 ))) \\ _G. C. Greubel_, Jul 26 2017

%K sign

%O 0,3

%A _Leroy Quet_, Jul 29 2009

%E Extended by _Emeric Deutsch_, Aug 01 2009

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 May 13 09:49 EDT 2024. Contains 372504 sequences. (Running on oeis4.)