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.

A116698 Expansion of (1-x+3*x^2+x^3) / ((1-x-x^2)*(1+2*x^2)).

Original entry on oeis.org

1, 0, 2, 5, 5, 4, 13, 29, 34, 39, 89, 176, 233, 313, 610, 1115, 1597, 2328, 4181, 7277, 10946, 16687, 28657, 48416, 75025, 117297, 196418, 326003, 514229, 815656, 1346269, 2211077, 3524578, 5637351, 9227465
Offset: 0

Views

Author

Creighton Dement, Feb 23 2006

Keywords

Crossrefs

Programs

  • Magma
    A116698:= func< n | Fibonacci(n+1) -((n mod 2) -2*0^((n+1) mod 4))*2^Floor(n/2) >;
    [A116898(n): n in [0..50]]; // G. C. Greubel, Aug 24 2025
    
  • Mathematica
    CoefficientList[Series[(1-x+3x^2+x^3)/((1-x-x^2)(1+2x^2)),{x,0,100}],x] (* or *) LinearRecurrence[{1,-1,2,2},{1,0,2,5},100] (* Harvey P. Dale, May 14 2022 *)
    Table[Fibonacci[n+1] -I^(n-1)*Mod[n,2]*2^Floor[n/2], {n,0,50}] (* G. C. Greubel, Aug 24 2025 *)
  • PARI
    Vec((1-x +3*x^2 +x^3)/((1-x-x^2)*(1+2*x^2)) + O(x^40)) \\ Colin Barker, May 18 2019
    
  • SageMath
    def A116898(n): return fibonacci(n+1) - (-1)**((n-1)//2)*(n%2)*2**(n//2)
    print([A116898(n) for n in range(51)]) # G. C. Greubel, Aug 24 2025

Formula

a(2*n) = A000045(2*n+1) = A001519(n).
a(n) = a(n-1) - a(n-2) + 2*a(n-3) + 2*a(n-4) for n > 3. - Colin Barker, May 18 2019
From G. C. Greubel, Aug 24 2025: (Start)
a(n) = A000045(n+1) - (-1)^floor((n-1)/2) * (n mod 2) * 2^floor(n/2).
E.g.f.: exp(x/2)*(cosh(sqrt(5)*x/2) + (1/sqrt(5))*sinh(sqrt(5)*x/2)) - sin(sqrt(2)*x)/sqrt(2). (End)