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!)
A152835 a(0) = -22; a(n) = n-a(n-1). 7

%I #21 Mar 15 2024 02:22:22

%S -22,23,-21,24,-20,25,-19,26,-18,27,-17,28,-16,29,-15,30,-14,31,-13,

%T 32,-12,33,-11,34,-10,35,-9,36,-8,37,-7,38,-6,39,-5,40,-4,41,-3,42,-2,

%U 43,-1,44,0,45,1,46,2,47,3,48,4,49,5,50,6,51,7,52,8,53,9,54,10,55,11,56,12

%N a(0) = -22; a(n) = n-a(n-1).

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

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

%F a(n) = a(n-1)+a(n-2)-a(n-3). G.f.: -(22*x^2-45*x+22) / ((x-1)^2*(x+1)). - _Colin Barker_, Oct 28 2014

%p A152835:=n->(1-89*(-1)^n+2*n)/4: seq(A152835(n), n=0..100); # _Wesley Ivan Hurt_, Oct 28 2014

%t lst={};a=-22;Do[a=n-a;AppendTo[lst,a],{n,0,6!}];lst

%o (PARI) Vec(-(22*x^2-45*x+22)/((x-1)^2*(x+1)) + O(x^100)) \\ _Colin Barker_, Oct 28 2014

%o (Magma) [(1-89*(-1)^n+2*n)/4 : n in [0..100]]; // _Wesley Ivan Hurt_, Oct 28 2014

%Y Cf. A084964, A152832, A152833.

%K sign,easy

%O 0,1

%A _Vladimir Joseph Stephan Orlovsky_, Dec 14 2008

%E Indices added to definition, offset corrected - _R. J. Mathar_, Jan 08 2009

%E Name and Mathematica code corrected by _Colin Barker_, Oct 28 2014

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