login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A123877 Expansion of (1+2*x)/(1+3*x+3*x^2). 3
1, -1, 0, 3, -9, 18, -27, 27, 0, -81, 243, -486, 729, -729, 0, 2187, -6561, 13122, -19683, 19683, 0, -59049, 177147, -354294, 531441, -531441, 0, 1594323, -4782969, 9565938, -14348907, 14348907, 0, -43046721 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,4

COMMENTS

Row sums of number triangle A123876.

LINKS

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

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

FORMULA

a(n) = Sum_{k=0..n} (-1)^(n-k)*C(n,k)*(cos(2*Pi*k/3) + sin(2*Pi*k/3)/sqrt(3)).

G.f.: G(0)*(1+2*x)/(2+3*x), where G(k)= 1 + 1/(1 - x*(k+3)/(x*(k+4) - 2/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Jun 16 2013

E.g.f.: (1/3)*exp(-3*x/2)*(3*cos((sqrt(3)*x)/2) + sqrt(3)*sin((sqrt(3)*x)/2)). - Stefano Spezia, Aug 08 2019

MAPLE

seq(coeff(series((1+2*x)/(1+3*x+3*x^2), x, n+1), x, n), n = 0..40); # G. C. Greubel, Aug 08 2019

MATHEMATICA

CoefficientList[Series[(1+2x)/(1+3x+3x^2), {x, 0, 40}], x] (* or *) LinearRecurrence[{-3, -3}, {1, -1}, 40] (* Harvey P. Dale, Dec 17 2017 *)

PROG

(PARI) my(x='x+O('x^40)); Vec((1+2*x)/(1+3*x+3*x^2)) \\ G. C. Greubel, Aug 08 2019

(MAGMA) I:=[1, -1]; [n le 2 select I[n] else -3*(Self(n-1)+Self(n-2)): n in [1..30]]; // G. C. Greubel, Aug 08 2019

(Sage)

def A123877_list(prec):

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

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

A123877_list(40) # G. C. Greubel, Aug 08 2019

(GAP) a:=[1, -1];; for n in [3..40] do a[n]:=-3*(a[n-1]+a[n-2]); od; a; # G. C. Greubel, Aug 08 2019

CROSSREFS

Cf. A123876.

Sequence in context: A030784 A203594 A325751 * A057681 A103312 A325729

Adjacent sequences:  A123874 A123875 A123876 * A123878 A123879 A123880

KEYWORD

easy,sign

AUTHOR

Paul Barry, Oct 16 2006

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 October 16 13:28 EDT 2019. Contains 328090 sequences. (Running on oeis4.)