A104161 G.f.: x*(1 - x + x^2)/((1-x)^2 * (1 - x - x^2)).
0, 1, 2, 5, 10, 19, 34, 59, 100, 167, 276, 453, 740, 1205, 1958, 3177, 5150, 8343, 13510, 21871, 35400, 57291, 92712, 150025, 242760, 392809, 635594, 1028429, 1664050, 2692507, 4356586, 7049123
Offset: 0
Links
- G. C. Greubel, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (3,-2,-1,1).
Programs
-
GAP
List([0..40], n-> 2*Fibonacci(n+2) -(n+2)); # G. C. Greubel, Jul 09 2019
-
Magma
[2*Fibonacci(n+2) -(n+2): n in [0..40]]; // G. C. Greubel, Jul 09 2019
-
Mathematica
a=0;b=1;Table[c=b+a+n; a=b; b=c, {n,-1,40}] (* Vladimir Joseph Stephan Orlovsky, Jan 21 2011 *) CoefficientList[Series[x*(1-x+x^2)/((1-x)^2*(1-x-x^2)),{x,0,40}],x] (* or *) LinearRecurrence[{3,-2,-1,1},{0,1,2,5},40] (* Harvey P. Dale, Sep 06 2012 *)
-
PARI
my(x='x+O('x^40)); concat(0, Vec(x*(1-x+x^2)/((1-x)^2*(1-x-x^2)))) \\ G. C. Greubel, Sep 26 2017
-
SageMath
[2*fibonacci(n+2) -(n+2) for n in (0..40)] # G. C. Greubel, Jul 09 2019
Formula
Superseeker results (incomplete): a(2) - 2a(n+1) + a(n) = A006355(n+1) (Number of binary vectors of length n containing no singletons); a(n+1) - a(n) = A001595(n) (2-ranks of difference sets constructed from Segre hyperovals); a(n) + n + 1 = A001595(n+1).
From Ross La Haye, Aug 03 2005: (Start)
a(n) = 2*(Fibonacci(n+2) - 1) - n.
a(n) = Sum_{k=0..n} A101220(n-k, 0, k). (End)
From Gary W. Adamson, Apr 02 2006: (Start)
a(n) = a(n-1) + a(n-2) + n-1.
a(n) = row sums of A117501, starting (1, 2, 5, 10, ...). (End)
a(n) = Sum_{k=0..n} A109754(n-k,k). - Ross La Haye, Apr 12 2006
a(n) = (Sum_{k=0..n} (n-k)*Fibonacci(k-1) + Fibonacci(k)) - n. - Ross La Haye, May 31 2006
From R. J. Mathar, Apr 18 2008: (Start)
a(n) = A006355(n+3) - n - 2. (End)
a(n) = 3*a(n-1) - 2*a(n-2) - a(n-3) + a(n-4); a(0)=0, a(1)=1, a(2)=2, a(3)=5. - Harvey P. Dale, Sep 06 2012
Comments