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!)
A182228 a(n) = 3*a(n-2) - a(n-1) for n > 1, a(0) = 0, a(1) = 1. 6
0, 1, -1, 4, -7, 19, -40, 97, -217, 508, -1159, 2683, -6160, 14209, -32689, 75316, -173383, 399331, -919480, 2117473, -4875913, 11228332, -25856071, 59541067, -137109280, 315732481, -727060321, 1674257764, -3855438727, 8878212019, -20444528200, 47079164257, -108412748857 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,4
COMMENTS
This is A006130 with minus signs on every other term. - T. D. Noe, Apr 23 2012
LINKS
FORMULA
From R. J. Mathar, Apr 22 2013: (Start)
a(n) = -A140167(n).
G.f.: x/(1 + x - 3*x^2). (End)
G.f.: 1 - Q(0), where Q(k) = 1 + 3*x^2 - (k+2)*x + x*(k+1 - 3*x)/Q(k+1); (continued fraction). - Sergei N. Gladkovskii, Oct 06 2013
E.g.f.: (-1/sqrt(13))*(exp(-(1+sqrt(13))*x/2) - exp(-(1-sqrt(13))*x/2)). - G. C. Greubel, Aug 30 2015
a(n) = (-(-1)^n/sqrt(13))*(((1 + sqrt(13))/2)^n - ((1 - sqrt(13))/2)^n). - Taras Goy, Jul 17 2018
MATHEMATICA
RecurrenceTable[{a[n]== - a[n-1] + 3*a[n-2], a[0]== 0, a[1]== 1}, a, {n, 0, 200}] (* G. C. Greubel, Aug 30 2015 *)
LinearRecurrence[{-1, 3}, {0, 1}, 40] (* Harvey P. Dale, Oct 23 2016 *)
PROG
(Python)
prpr = 0
prev = 1
for i in range(2, 55):
current = prpr*3-prev
print (current, end=', ')
prpr = prev
prev = current
(Magma) [n le 2 select n-1 else -Self(n-1) + 3*Self(n-2): n in [1..40]]; // Vincenzo Librandi, Aug 31 2015
CROSSREFS
Cf. A140167.
Sequence in context: A323105 A006130 A140167 * A352007 A182646 A190646
KEYWORD
sign,easy
AUTHOR
Alex Ratushnyak, Apr 19 2012
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 May 4 02:59 EDT 2024. Contains 372225 sequences. (Running on oeis4.)