|
|
A175722
|
|
a(n) = -a(n-1) + a(n-2) - F(-n) + 1, a(0) = 1, a(1) = -1, where F() = Fibonacci numbers A000045.
|
|
4
|
|
|
1, -1, 4, -6, 14, -24, 47, -83, 152, -268, 476, -832, 1453, -2517, 4348, -7474, 12810, -21880, 37275, -63335, 107376, -181656, 306744, -517056, 870169, -1462249, 2453812, -4112478, 6884102, -11510808, 19226951, -32084027, 53489288, -89097892, 148290068
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
LINKS
|
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
|
|
FORMULA
|
G.f.: 1/(- x^m + 1 - x^(1 + m) + x + 3*x^(2 + m) - 2*x^2 - x^(3 + m)) for m=2.
G.f.: 1 / ((1 - x) * (1 + x - x^2)^2). - Michael Somos, Mar 11 2014
a(n) = A006478(-2-n) for all n in Z. - Michael Somos, Mar 11 2014
a(n) = 1 + (-1)^n*(n*Lucas(n+1) + 7*Fibonacci(n))/5. - G. C. Greubel, Dec 04 2019
|
|
EXAMPLE
|
G.f. = 1 - x + 4*x^2 - 6*x^3 + 14*x^4 - 24*x^5 + 47*x^6 - 83*x^7 + 152*x^8 + ...
|
|
MAPLE
|
with(combinat); seq( 1 + (-1)^n*(n*fibonacci(n+2) + (n+7)*fibonacci(n))/5, n=0..40); # G. C. Greubel, Dec 04 2019
|
|
MATHEMATICA
|
f[x_, m_] = ExpandAll[(x -x^(m+1))*(1-x-x^2) -(1 -2*x +x^(m+1))];
g[x_, n_] = ExpandAll[x^(m + 3)*f[1/x, m]];
a = Table[Table[SeriesCoefficient[Series[1/g[x, m], {x, 0, 20}], n], {n, 0, 20}], {m, 1, 20}]
CoefficientList[Series[1/((1-x)(1+x-x^2)^2), {x, 0, 40}], x] (* Vincenzo Librandi, Mar 13 2014 *)
RecurrenceTable[{a[0]==1, a[1]==-1, a[n]==-a[n-1]+a[n-2]-Fibonacci[-n]+1}, a, {n, 40}] (* Harvey P. Dale, May 12 2018 *)
Table[1 + (-1)^n*(n*LucasL[n+1] + 7*Fibonacci[n])/5, {n, 0, 40}] (* G. C. Greubel, Dec 04 2019 *)
|
|
PROG
|
(PARI) {a(n) = if( n<0, polcoeff( x^5 / ((1 - x) * (1 - x - x^2)^2) + x * O(x^-n), -n), polcoeff( 1 / ((1 - x) * (1 + x - x^2)^2) + x * O(x^n), n))}; /* Michael Somos, Mar 11 2014 */
(PARI) vector(41, n, my(f=fibonacci); 1 -(-1)^n*((n-1)*f(n+1) +(n+6)*f(n-1))/5 ) \\ G. C. Greubel, Dec 04 2019
(MAGMA) m:=50; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!(1/((1-x)*(1+x-x^2)^2))); // G. C. Greubel, Aug 14 2018
(Sage) [1 + (-1)^n*(n*lucas_number2(n+1, 1, -1) + 7*fibonacci(n))/5 for n in (0..40)] # G. C. Greubel, Dec 04 2019
(GAP) List([0..40], n-> 1 + (-1)^n*(n*Lucas(1, -1, n+1)[2] + 7*Fibonacci(n))/5 ); # G. C. Greubel, Dec 04 2019
|
|
CROSSREFS
|
Cf. m=1: A077899, m large: A077925.
Cf. A000032, A000045, A006478.
Sequence in context: A097271 A126867 A027632 * A200186 A192782 A306742
Adjacent sequences: A175719 A175720 A175721 * A175723 A175724 A175725
|
|
KEYWORD
|
sign,easy
|
|
AUTHOR
|
Roger L. Bagula, Dec 04 2010
|
|
STATUS
|
approved
|
|
|
|