A104004 Expansion of (1-x) * (1+x) / ((1-2*x)*(1-x-x^2)).
1, 3, 7, 16, 35, 75, 158, 329, 679, 1392, 2839, 5767, 11678, 23589, 47555, 95720, 192427, 386451, 775486, 1555153, 3117071, 6245088, 12507887, 25044431, 50135230, 100345485, 200812363, 401821144, 803960099, 1608434427, 3217700894, 6436748057
Offset: 0
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (3,-1,-2).
Crossrefs
Programs
-
Magma
[3*2^n-Fibonacci(n+3): n in [0..40]]; // Vincenzo Librandi, Aug 18 2017
-
Maple
with (combinat):a[0]:=0:a[1]:=1:for n from 2 to 50 do a[n]:=fibonacci(n-1)+2*a[n-1] od: seq(a[n], n=1..26); # Zerinvary Lajos, Mar 17 2008
-
Mathematica
LinearRecurrence[{3, -1, -2}, {1, 3, 7}, 80] (* Vincenzo Librandi, Aug 18 2017 *) CoefficientList[Series[(1-x)(1+x)/((2x-1)(x^2+x-1)),{x,0,40}],x] (* Harvey P. Dale, Oct 12 2024 *) A104004[n_]:= 3*2^n -Fibonacci[n+3]; (* G. C. Greubel, Jun 05 2025 *)
-
SageMath
def A104004(n): return 3*2**n - fibonacci(n+3) # G. C. Greubel, Jun 05 2025
Formula
Suggestions made by Superseeker: (Start)
a(n+2) - a(n+1) - a(n) = A042950(n+1).
Coefficients of g.f.*(1-x)/(1+x) match A099036.
Coefficients of g.f./(1+x) match A027934.
Coefficients of g.f./(1-x^2) match A008466. (End)
a(n) = 3*2^n - Fibonacci(n+3) = A221719(n) + 1. - Ralf Stephan, May 20 2007, Hugo Pfoertner, Mar 06 2024
a(n) = (3*2^n - (2^(-n)*((1-sqrt(5))^n*(-2+sqrt(5)) + (1+sqrt(5))^n*(2+sqrt(5)))) / sqrt(5)). - Colin Barker, Aug 18 2017
From G. C. Greubel, Jun 05 2025: (Start)
E.g.f.: 3*exp(2*x) - (2/sqrt(5))*exp(x/2)*( 2*sinh(sqrt(5)*x/2) + sqrt(5)*cosh(sqrt(5)*x/2) ). (End)
Comments