OFFSET
0,4
COMMENTS
Subsequence of A002061.
LINKS
Harvey P. Dale, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (4,-2,-6,4,2,-1).
FORMULA
G.f.: -(x^5+x^4-7*x^3+x^2+3*x-1) / ((x-1)*(x+1)*(x^2-3*x+1)*(x^2+x-1)). - Alois P. Heinz, Sep 15 2015
EXAMPLE
For n=2, a(n) = Fibonacci(n)^2 - Fibonacci(n) + 1 = 1^2 - 1 + 1 = 1.
MATHEMATICA
#^2-#+1&/@Fibonacci[Range[0, 30]] (* or *) LinearRecurrence[{4, -2, -6, 4, 2, -1}, {1, 1, 1, 3, 7, 21}, 40] (* Harvey P. Dale, Sep 29 2019 *)
PROG
(PARI) a(n) = fibonacci(n)^2 - fibonacci(n) + 1;
vector(30, n, a(n))
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Altug Alkan, Sep 14 2015
STATUS
approved