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!)
A106540 a(n) = a(n-1) - 2*a(n-2) - 3*a(n-3) - ... - (n-1)*a(1), with a(1) = a(2) = 1, a(3) = -1. 3
1, 1, -1, -6, -11, -5, 28, 87, 111, -46, -519, -1105, -812, 2051, 8003, 12130, 477, -43213, -107764, -106273, 133575, 716562, 1269265, 492135, -3436796, -10232533, -12529349, 6701026, 62284757, 128290443, 86849596, -256333913, -946668833 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,4

LINKS

G. C. Greubel, Table of n, a(n) for n = 1..1000

Index entries for linear recurrences with constant coefficients, signature (3,-5,2).

FORMULA

a(n) = a(n-1) - Sum_{k=2..n-1} k*a(n-k), with a(1) = a(2) = 1, a(3) = -1.

G.f.: x*(1 - x)^2/(1 - 3*x + 5*x^2 - 2*x^3). - corrected by R. J. Mathar, Aug 22 2008

a(n) = 3*a(n-1) - 5*a(n-2) + 2*a(n-3). - G. C. Greubel, Sep 03 2021

MATHEMATICA

LinearRecurrence[{3, -5, 2}, {1, 1, -1}, 40] (* G. C. Greubel, Sep 03 2021 *)

PROG

(MAGMA) I:=[1, 1, -1]; [n le 3 select I[n] else 3*Self(n-1) - 5*Self(n-2) + 2*Self(n-3): n in [1..41]]; // G. C. Greubel, Sep 03 2021

(Sage)

def A106540_list(prec):

    P.<x> = PowerSeriesRing(ZZ, prec)

    return P( x*(1-x)^2/(1-3*x+5*x^2-2*x^3) ).list()

a=A106540_list(41); a[1:] # G. C. Greubel, Sep 03 2021

CROSSREFS

Cf. A106541, A106542.

Sequence in context: A100129 A009443 A258054 * A212208 A334280 A134012

Adjacent sequences:  A106537 A106538 A106539 * A106541 A106542 A106543

KEYWORD

easy,sign

AUTHOR

Alexandre Wajnberg, May 08 2005

EXTENSIONS

Extended beyond a(14) by R. J. Mathar, Aug 22 2008

STATUS

approved

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 August 7 23:50 EDT 2022. Contains 355995 sequences. (Running on oeis4.)