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-1 of 1 results.

A215458 a(n) = 4*a(n-1) - 7*a(n-2) + 8*a(n-3) - 4*a(n-4) starting 0, 1, 4, 7.

Original entry on oeis.org

0, 1, 4, 7, 8, 11, 28, 71, 144, 259, 484, 991, 2072, 4187, 8236, 16247, 32544, 65587, 131572, 262543, 523688, 1047179, 2096956, 4196903, 8391600, 16775011, 33546244, 67105087, 134230328, 268455611, 536865868, 1073696471, 2147448384, 4295022739
Offset: 0

Views

Author

R. J. Mathar, Aug 11 2012

Keywords

Programs

  • Magma
    I:=[0,1,4,7]; [n le 4 select I[n] else 4*Self(n-1)-7*Self(n-2)+8*Self(n-3)-4*Self(n-4): n in [1..40]]; // Vincenzo Librandi, Dec 23 2012
    
  • Mathematica
    CoefficientList[Series[-x (-1 + 2 x^2)/((x - 1) (2*x-1) (2 x^2 - x + 1)), {x, 0, 40}], x] (* Vincenzo Librandi, Dec 23 2012 *)
    LinearRecurrence[{4,-7,8,-4},{0,1,4,7},40] (* Harvey P. Dale, Mar 22 2019 *)
  • PARI
    a(n)=([0,1,0,0; 0,0,1,0; 0,0,0,1; -4,8,-7,4]^n*[0;1;4;7])[1,1] \\ Charles R Greathouse IV, Jul 07 2017
    
  • Sage
    a = lambda n: (2^n - lucas_number2(n, 1, 2) + 1) // 2
    print([a(n) for n in range(34)]) # Peter Luschny, Jul 26 2017

Formula

G.f.: -x*(-1+2*x^2) / ( (x-1)*(2*x-1)*(2*x^2-x+1) ).
a(n) = A002248(n)/2.
a(n) = (2^n - (1/2 - (i * sqrt(7))/2)^n - (1/2 + (i * sqrt(7))/2)^n + 1)/2 where i = sqrt(-1). - Paul S. Vanderveen, Jul 08 2017
a(n) = 2^(n-1) - 2^(n/2) * cos(n * arctan(sqrt(7))) + 1/2. - Peter Luschny, Jul 26 2017
Showing 1-1 of 1 results.