login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A114285 Expansion of (1-3*x)/((1-x)*(1-x^2)). 5
1, -2, -1, -4, -3, -6, -5, -8, -7, -10, -9, -12, -11, -14, -13, -16, -15, -18, -17, -20, -19, -22, -21, -24, -23, -26, -25, -28, -27, -30, -29, -32, -31, -34, -33, -36, -35, -38, -37, -40, -39, -42, -41, -44, -43, -46, -45, -48, -47, -50, -49, -52, -51, -54, -53, -56, -55, -58, -57, -60, -59, -62, -61 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

COMMENTS

Diagonal sums of A114284.

LINKS

Table of n, a(n) for n=0..62.

Index entries for linear recurrences with constant coefficients, signature (1,1,-1).

FORMULA

G.f.: (1-3*x)/((1-x)*(1-x^2));

a(n) = Sum_{k=0..floor(n/2)} 3*0^(n-2k)-2;

a(n) = 3*(1+(-1)^n)/2-2*floor((n+2)/2).

a(n) = -A103889(n). - R. J. Mathar, Apr 06 2008

From Wesley Ivan Hurt, Sep 06 2015: (Start)

a(n) = a(n-1)+a(n-2)-a(n-3), n>2.

a(n) = (-1)^n - n. (End)

MAPLE

A114285:=n->(-1)^n-n: seq(A114285(n), n=0..70); # Wesley Ivan Hurt, Sep 06 2015

MATHEMATICA

Table[(-1)^n-n, {n, 0, 70}] (* Wesley Ivan Hurt, Sep 06 2015 *)

CoefficientList[Series[(1 - 3 x)/((1 - x) (1 - x^2)), {x, 0, 70}] , x] (* Vincenzo Librandi, Sep 07 2015 *)

LinearRecurrence[{1, 1, -1}, {1, -2, -1}, 70] (* Harvey P. Dale, Jul 24 2019 *)

PROG

(MAGMA) [(-1)^n-n : n in [0..70]]; // Wesley Ivan Hurt, Sep 06 2015

(MAGMA) I:=[1, -2, -1]; [n le 3 select I[n] else Self(n-1)+Self(n-2)-Self(n-3): n in [1..70]]; // Vincenzo Librandi, Sep 07 2015

CROSSREFS

Cf. A103889, A114284.

Sequence in context: A147965 A167542 A167419 * A014681 A103889 A137805

Adjacent sequences:  A114282 A114283 A114284 * A114286 A114287 A114288

KEYWORD

easy,sign

AUTHOR

Paul Barry, Nov 20 2005

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified February 28 08:28 EST 2020. Contains 332323 sequences. (Running on oeis4.)