A112469 Partial sums of (-1)^n*Fibonacci(n-1).
1, 1, 2, 1, 3, 0, 5, -3, 10, -11, 23, -32, 57, -87, 146, -231, 379, -608, 989, -1595, 2586, -4179, 6767, -10944, 17713, -28655, 46370, -75023, 121395, -196416, 317813, -514227, 832042, -1346267, 2178311, -3524576, 5702889, -9227463, 14930354, -24157815, 39088171, -63245984, 102334157
Offset: 0
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..300
- Index entries for linear recurrences with constant coefficients, signature (0,2,-1).
Programs
-
Magma
A112469:= func< n | 2 + (-1)^n*Fibonacci(n-2) >; [A112469(n): n in [0..40]]; // G. C. Greubel, Apr 17 2025
-
Maple
a[0]:=1:a[1]:=1:a[2]:=2:a[3]:=1:for n from 4 to 50 do a[n]:=2*a[n-2]-a[n-3] od: seq(a[n], n=0..42); # Zerinvary Lajos, Apr 04 2008
-
Mathematica
Accumulate[Table[(-1)^n Fibonacci[n-1],{n,0,50}]] (* Harvey P. Dale, Nov 05 2011 *) Table[2 +(-1)^n*Fibonacci[n-2], {n,0,50}] (* G. C. Greubel, Apr 17 2025 *)
-
SageMath
def A112469(n): return 2+(-1)^n*fibonacci(n-2) print([A112469(n) for n in range(41)]) # G. C. Greubel, Apr 17 2025
Formula
G.f.: (1+x)/((1-x)*(1+x-x^2)).
a(n) = Sum_{k=0..floor(n/2)} Sum_{j=0..n-2k} C(n-k-j-1, n-2k-j)*(-1)^(n-j).
From G. C. Greubel, Apr 17 2025: (Start)
a(n) = 2 + (-1)^n*Fibonacci(n-2).
E.g.f.: 2*exp(x) - exp(-x/2)*( cosh(sqrt(5)*x/2) + (3/sqrt(5))*sinh(sqrt(5)*x/2) ). (End)
Comments