cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-2 of 2 results.

A119282 Alternating sum of the first n Fibonacci numbers.

Original entry on oeis.org

0, -1, 0, -2, 1, -4, 4, -9, 12, -22, 33, -56, 88, -145, 232, -378, 609, -988, 1596, -2585, 4180, -6766, 10945, -17712, 28656, -46369, 75024, -121394, 196417, -317812, 514228, -832041, 1346268, -2178310, 3524577, -5702888, 9227464, -14930353, 24157816, -39088170, 63245985, -102334156, 165580140, -267914297, 433494436, -701408734, 1134903169, -1836311904, 2971215072, -4807526977, 7778742048
Offset: 0

Views

Author

Stuart Clary, May 13 2006

Keywords

Comments

Apart from signs, same as A008346.
Natural bilateral extension (brackets mark index 0): ..., 88, 54, 33, 20, 12, 7, 4, 2, 1, 0, [0], -1, 0, -2, 1, -4, 4, -9, 12, -22, 3, ... This is A000071-reversed followed by A119282.
Alternating sums of rows of the triangle in A141169. - Reinhard Zumkeller, Mar 22 2011

Crossrefs

Programs

  • Magma
    [0] cat [(&+[(-1)^k*Fibonacci(k):k in [1..n]]): n in [1..30]]; // G. C. Greubel, Jan 17 2018
  • Mathematica
    FoldList[#1 - Fibonacci@ #2 &, -Range@ 50] (* Michael De Vlieger, Jan 27 2016 *)
    Accumulate[Table[(-1)^n Fibonacci[n], {n, 0, 49}]] (* Alonso del Arte, Apr 25 2017 *)
  • PARI
    a(n) = sum(k=1, n, (-1)^k*fibonacci(k)); \\ Michel Marcus, Jan 27 2016
    

Formula

Let F(n) be the Fibonacci number A000045(n).
a(n) = Sum_{k = 1..n} (-1)^k F(k).
Closed form: a(n) = (-1)^n F(n-1) - 1 = (-1)^n A008346(n-1).
Recurrence: a(n) - 2 a(n-2) + a(n-3)= 0.
G.f.: A(x) = -x/(1 - 2 x^2 + x^3) = -x/((1 - x)(1 + x - x^2)).
Another recurrence: a(n) = a(n-2) - a(n-1) - 1. - Rick L. Shepherd, Aug 12 2009

A094570 Triangle T(n,k) read by rows: T(n,k) = F(k) + F(n-k) where F(n) is the n-th Fibonacci number.

Original entry on oeis.org

0, 1, 1, 1, 2, 1, 2, 2, 2, 2, 3, 3, 2, 3, 3, 5, 4, 3, 3, 4, 5, 8, 6, 4, 4, 4, 6, 8, 13, 9, 6, 5, 5, 6, 9, 13, 21, 14, 9, 7, 6, 7, 9, 14, 21, 34, 22, 14, 10, 8, 8, 10, 14, 22, 34, 55, 35, 22, 15, 11, 10, 11, 15, 22, 35, 55, 89, 56, 35, 23, 16, 13, 13, 16, 23, 35, 56, 89, 144, 90, 56, 36, 24, 18, 16, 18, 24, 36, 56, 90, 144
Offset: 0

Views

Author

Clark Kimberling, May 12 2004

Keywords

Examples

			Triangle begins:
0;
1, 1;
1, 2, 1;
2, 2, 2, 2;
3, 3, 2, 3, 3;
5, 4, 3, 3, 4, 5;
8, 6, 4, 4, 4, 6, 8;
13, 9, 6, 5, 5, 6, 9, 13;
21, 14, 9, 7, 6, 7, 9, 14, 21;
		

Crossrefs

Programs

  • PARI
    row(n) = vector(n+1, k, k--; fibonacci(k)+fibonacci(n-k)); \\ Michel Marcus, Mar 22 2021

Formula

Row n: F(0)+F(n), F(1)+F(n-1), F(2)+F(n-2), ..., F(n-1)+F(1), F(n)+F(0).
From Reinhard Zumkeller, Mar 21 2011: (Start)
T(n,0) = T(n,n) = A000045(n).
T(2*n,n) = A006355(n+1).
T(n,k) = A141169(n,k) + A141169(n,n-k). (End)
Sum(T(n,k), 0<=k<=n) = 2*A000071(n+2) = 2*A000045(n+2) - 2. - Philippe Deléham, Apr 07 2013
Showing 1-2 of 2 results.