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.

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

Original entry on oeis.org

0, 0, 1, 2, 2, 1, 1, 4, 9, 12, 11, 11, 21, 43, 66, 78, 88, 129, 226, 360, 485, 605, 826, 1287, 2012, 2881, 3851, 5239, 7669, 11592, 16936, 23596, 32581, 46498, 68366, 99913, 142173, 199384, 282701, 408720, 593595, 851835, 1207901, 1714447, 2458522
Offset: 0

Views

Author

Paul Barry, Oct 11 2005

Keywords

Comments

Diagonal sums of number triangle A113020.

Crossrefs

Programs

  • Magma
    I:=[0,0,1,2]; [n le 4 select I[n] else 2*Self(n-1) - 2*Self(n-2) + Self(n-3) + Self(n-4): n in [1..30]]; // G. C. Greubel, Apr 09 2018
  • Mathematica
    Table[Sum[(-1)^(k + 1) Binomial[n - k, k] Fibonacci@ k, {k, 0, Floor[n/2]}], {n, 0, 44}] (* Michael De Vlieger, Feb 13 2017 *)
    LinearRecurrence[{2,-2,1,1},{0,0,1,2},50] (* Harvey P. Dale, Jul 16 2018 *)
  • PARI
    a(n)=([0,1,0,0; 0,0,1,0; 0,0,0,1; 1,1,-2,2]^n*[0;0;1;2])[1,1] \\ Charles R Greathouse IV, Feb 14 2017
    
  • PARI
    x='x+O('x^30); concat([0,0], Vec(x^2/(1-2*x+2*x^2-x^3-x^4))) \\ G. C. Greubel, Apr 09 2018
    

Formula

a(n) = 2*a(n-1) - 2*a(n-2) + a(n-3) + a(n-4);
a(n) = Sum_{k=0..floor(n/2)} Sum_{j=0..n-k} C(n-k, j)*C(0, j-k)*Fibonacci(j-2k);
a(n) = Sum_{k=0..floor(n/2)} (-1)^(k+1)*binomial(n-k, k)*Fibonacci(k).