OFFSET
0,2
COMMENTS
a(n) is prime for n = 1, 2, 5, 7, 14, 15, 29, 40, 49, 57, 70, 87, 105, 127, 175, 279, 362, 647, 727, ...
Let (A), (B) and (C) be sequences of the Fibonacci type, x = {1, 2, ...}, y = {0, 1, ...}. Form the three sequences with the initial values A(0) = x, A(1) = y, B(0) = 7*x - y, B(1) = 11*x, C(0) = A(n), C(1) = B(n). Then a(n) = C(n)/x always applies. - Klaus Purath, Oct 28 2019
LINKS
Bruno Berselli, Table of n, a(n) for n = 0..500
Index entries for linear recurrences with constant coefficients, signature (2,2,-1).
FORMULA
G.f.: (1+3*x+x^2) / ((1+x)*(1-3*x+x^2)). - Corrected by Colin Barker, Sep 28 2016
a(n) = -a(-n-1) = 2*a(n-1) + 2*a(n-2) - a(n-3) for all n in Z.
a(n) - a(n-1) = 2*A099016(n) with a(-1)=-1.
a(n) + a(n-1) = 2*A097134(n) for n>0.
Sum_{i>=0} 1/a(i) = 1.3232560865206157372628688449331...
a(n) = (2^(-n)*(-(-2)^n-3*(3-sqrt(5))^n*(-1+sqrt(5))+3*(1+sqrt(5))*(3+sqrt(5))^n))/5. - Colin Barker, Sep 28 2016
From Klaus Purath, Oct 28 2019: (Start)
(a(n-3) - a(n-2) - a(n-1) + a(n))/6 = Fibonacci(2*n-2).
(a(n-5) + a(n))/30 = Fibonacci(2*n-4).
(a(n) - a(n-4))/18 = Fibonacci(2*n-3). (End)
MAPLE
a:= n-> (<<0|1|0>, <0|0|1>, <-1|2|2>>^n. <<1, 5, 13>>)[1, 1]:
seq(a(n), n=0..30); # Alois P. Heinz, Sep 28 2016
MATHEMATICA
Table[6 Fibonacci[n] Fibonacci[n + 1] + (-1)^n, {n, 0, 30}]
LinearRecurrence[{2, 2, -1}, {1, 5, 13}, 30] (* Harvey P. Dale, Jul 12 2019 *)
PROG
(Sage) [6*fibonacci(n)*fibonacci(n+1)+(-1)^n for n in (0..30)]
(Maxima) makelist(6*fib(n)*fib(n+1)+(-1)^n, n, 0, 30);
(MAGMA) [6*Fibonacci(n)*Fibonacci(n+1)+(-1)^n: n in [0..30]];
(PARI) for(n=0, 30, print1(6*fibonacci(n)*fibonacci(n+1)+(-1)^n", "));
(PARI) a(n) = round((2^(-n)*(-(-2)^n-3*(3-sqrt(5))^n*(-1+sqrt(5))+3*(1+sqrt(5))*(3+sqrt(5))^n))/5) \\ Colin Barker, Sep 28 2016
(PARI) Vec((1+3*x+x^2)/((1+x)*(1-3*x+x^2)) + O(x^30)) \\ Colin Barker, Sep 28 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Bruno Berselli, Nov 03 2015
STATUS
editing