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!)
A028860 a(n+2) = 2*a(n+1) + 2*a(n); a(0) = -1, a(1) = 1. 15
-1, 1, 0, 2, 4, 12, 32, 88, 240, 656, 1792, 4896, 13376, 36544, 99840, 272768, 745216, 2035968, 5562368, 15196672, 41518080, 113429504, 309895168, 846649344, 2313089024, 6319476736, 17265131520, 47169216512, 128868696064, 352075825152, 961889042432, 2627929735168 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,4
COMMENTS
a(n+1) is the top left entry of the n-th power of the 3 X 3 matrix [0, 1, 1; 1, 1, 1; 1, 1, 1]. - R. J. Mathar, Feb 04 2014
(A002605, a(.+1)) is the canonical basis of the space of linear recurrent sequences with signature (2, 2), i.e., any sequence s(n) = 2(s(n-1) + s(n-2)) is given by s = s(0)*A002605 + s(1)*a(.+1). - M. F. Hasler, Aug 06 2018
LINKS
Martin Burtscher, Igor Szczyrba, and Rafał Szczyrba, Analytic Representations of the n-anacci Constants and Generalizations Thereof, Journal of Integer Sequences, Vol. 18 (2015), Article 15.4.5.
Tanya Khovanova, Recursive Sequences
FORMULA
a(n) = 4*A028859(n-4), for n > 3.
From R. J. Mathar, Nov 27 2008: (Start)
G.f.: -(1 - 3*x)/(1 - 2*x - 2*x^2).
a(n) = 3*A002605(n-1) - A002605(n). (End)
a(n) = det A, where A is the Hessenberg matrix of order n+1 defined by: A[i,j] = p(j - i + 1) (i <= j), A[i,j] = -1 (i = j + 1), A[i,j] = 0 otherwise, with p(i) = fibonacci(2i - 4). - Milan Janjic, May 08 2010, edited by M. F. Hasler, Aug 06 2018
a(n) = (2*sqrt(3) - 3)/6*(1 + sqrt(3))^n - (2*sqrt(3) + 3)/6*(1 - sqrt(3))^n. - Sergei N. Gladkovskii, Jul 18 2012
a(n) = 2*A002605(n-2) for n >= 2. - M. F. Hasler, Aug 06 2018
E.g.f.: exp(x)*(2*sqrt(3)*sinh(sqrt(3)*x) - 3*cosh(sqrt(3)*x))/3. - Franck Maminirina Ramaharo, Nov 11 2018
MAPLE
seq(coeff(series((3*x-1)/(1-2*x-2*x^2), x, n+1), x, n), n=0..30); # Muniru A Asiru, Aug 07 2018
MATHEMATICA
(With a different offset) M = {{0, 2}, {1, 2}} v[1] = {0, 1} v[n_] := v[n] = M.v[n - 1] a = Table[Abs[v[n][[1]]], {n, 1, 50}] (* Roger L. Bagula, May 29 2005 *)
LinearRecurrence[{2, 2}, {-1, 1}, 40] (* Harvey P. Dale, Dec 13 2012 *)
CoefficientList[Series[(-3 x + 1)/(2 x^2 + 2 x - 1), {x, 0, 27}], x] (* Robert G. Wilson v, Aug 07 2018 *)
PROG
(Haskell)
a028860 n = a028860_list !! n
a028860_list =
-1 : 1 : map (* 2) (zipWith (+) a028860_list (tail a028860_list))
-- Reinhard Zumkeller, Oct 15 2011
(PARI) apply( A028860(n)=([2, 2; 1, 0]^n)[2, ]*[1, -1]~, [0..30]) \\ 15% faster than (A^n*[1, -1]~)[2]. - M. F. Hasler, Aug 06 2018
(GAP) a:=[-1, 1];; for n in [3..30] do a[n]:=2*a[n-1]+2*a[n-2]; od; a; # Muniru A Asiru, Aug 07 2018
(Magma) I:=[-1, 1]; [n le 2 select I[n] else 2*Self(n-1)+2*Self(n-2): n in [1..40]]; // Vincenzo Librandi, Aug 13 2018
(SageMath)
A028860 = BinaryRecurrenceSequence(2, 2, -1, 1)
[A028860(n) for n in range(51)] # G. C. Greubel, Dec 08 2022
CROSSREFS
Sequence in context: A302919 A181329 A293007 * A152035 A026151 A025178
KEYWORD
sign,easy
AUTHOR
EXTENSIONS
Edited by N. J. A. Sloane, Apr 11 2009
Edited and initial values added in definition by M. F. Hasler, Aug 06 2018
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 April 26 02:53 EDT 2024. Contains 371989 sequences. (Running on oeis4.)