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.

A187272 a(n) = (n/4)*2^(n/2)*((1+sqrt(2))^2 + (-1)^n*(1-sqrt(2))^2).

Original entry on oeis.org

0, 2, 6, 12, 24, 40, 72, 112, 192, 288, 480, 704, 1152, 1664, 2688, 3840, 6144, 8704, 13824, 19456, 30720, 43008, 67584, 94208, 147456, 204800, 319488, 442368, 688128, 950272, 1474560, 2031616, 3145728, 4325376, 6684672, 9175040, 14155776, 19398656, 29884416, 40894464, 62914560, 85983232
Offset: 0

Views

Author

N. J. A. Sloane, Mar 07 2011

Keywords

Crossrefs

Programs

  • Magma
    [Round((n/4)*2^(n/2)*((1+Sqrt(2))^2 + (-1)^n*(1-Sqrt(2))^2)): n in [0..30]]; // G. C. Greubel, Nov 28 2017
    
  • Maple
    R:=(b,n)-> expand(simplify( (n/4)*b^(n/2)*((1+sqrt(b))^2+(-1)^n*(1-sqrt(b))^2) ));
    [seq(R(2,n),n=0..100)];
  • Mathematica
    CoefficientList[Series[2 x (1 + x) (1 + 2 x) / (1 - 2 x^2)^2, {x, 0, 40}], x] (* Vincenzo Librandi, Jun 19 2013 *)
  • PARI
    x='x+O('x^30); concat([0], Vec(2*x*(1+x)*(1+2*x)/(1-2*x^2)^2)) \\ G. C. Greubel, Nov 28 2017
    
  • Python
    def A187272(n): return (n<<(n+1>>1) if n&1 else 3*n<<(n-2>>1)) if n else 0 # Chai Wah Wu, Feb 18 2024

Formula

From Bruno Berselli, Mar 22 2011: (Start)
G.f.: 2*x*(1+x)*(1+2*x)/(1-2*x^2)^2.
a(n)/a(n-2) = 2*n/(n-2). (End)
a(2*n) = 3*n*2^n, a(2*n+1) = (2*n+1)*2^(n+1). - Andrew Howroyd, Mar 28 2016