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!)
A135261 a(n) = 3*A131090(n) - A131090(n+1). 1
-1, 3, -1, 2, -1, 5, 6, 17, 27, 58, 111, 229, 454, 913, 1819, 3642, 7279, 14565, 29126, 58257, 116507, 233018, 466031, 932069, 1864134, 3728273, 7456539, 14913082, 29826159, 59652325, 119304646, 238609297, 477218587, 954437178, 1908874351, 3817748709, 7635497414 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
LINKS
FORMULA
A131090(n) - a(n) = A131556(n).
O.g.f.: (1-x)^2*(1-3*x)/((2*x-1)*(1+x)*(x^2-x+1)). - R. J. Mathar, Jul 22 2008
a(n) = 2*a(n-1) - a(n-3) + 2*a(n-4). - G. C. Greubel, Oct 07 2016
MAPLE
seq(coeff(series((1-x)^2*(1-3*x)/((2*x-1)*(1+x)*(x^2-x+1)), x, n+1), x, n), n = 0 .. 40); # G. C. Greubel, Nov 21 2019
MATHEMATICA
LinearRecurrence[{2, 0, -1, 2}, {-1, 3, -1, 2}, 40] (* G. C. Greubel, Oct 07 2016 *)
PROG
(PARI) my(x='x+O('x^40)); Vec((1-x)^2*(1-3*x)/((2*x-1)*(1+x)*(x^2-x+1))) \\ G. C. Greubel, Nov 21 2019
(Magma) R<x>:=PowerSeriesRing(Integers(), 40); Coefficients(R!( (1-x)^2*(1-3*x)/((2*x-1)*(1+x)*(x^2-x+1)) )); // G. C. Greubel, Nov 21 2019
(Sage)
def A135261_list(prec):
P.<x> = PowerSeriesRing(ZZ, prec)
return P((1-x)^2*(1-3*x)/((2*x-1)*(1+x)*(x^2-x+1))).list()
A135261_list(40) # G. C. Greubel, Nov 21 2019
(GAP) a:=[-1, 2, -1, 2];; for n in [5..40] do a[n]:=2*a[n-1] -a[n-3] +2*a[n-4]; od; a; # G. C. Greubel, Nov 21 2019
CROSSREFS
Sequence in context: A318323 A366803 A347396 * A339913 A102774 A131918
KEYWORD
sign
AUTHOR
Paul Curtz, Dec 01 2007
EXTENSIONS
Edited and extended by R. J. Mathar, Jul 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 March 29 01:36 EDT 2024. Contains 371264 sequences. (Running on oeis4.)