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.

A167030 a(n) = (2^n - (-1)^n - 3)/3.

Original entry on oeis.org

-1, 0, 0, 2, 4, 10, 20, 42, 84, 170, 340, 682, 1364, 2730, 5460, 10922, 21844, 43690, 87380, 174762, 349524, 699050, 1398100, 2796202, 5592404, 11184810, 22369620, 44739242, 89478484, 178956970, 357913940, 715827882
Offset: 0

Views

Author

Paul Curtz, Oct 27 2009

Keywords

Crossrefs

A026644 is an essentially identical sequence.

Programs

  • Magma
    [(2^n-(-1)^n)/3 -1: n in [0..40] ]; // Vincenzo Librandi, Apr 28 2011
    
  • Mathematica
    f[n_] := (2^n - (-1)^n - 3)/3; Array[f, 32, 0]
  • PARI
    a(n)=(2^n-(-1)^n)/3-1 \\ Charles R Greathouse IV, Oct 07 2015

Formula

a(n) = A001045(n) - 1.
a(n) = 2*a(n-1) + a(n-2) - 2*a(n-3).
G.f.: (1 - 2*x - x^2)/((x^2 - 1)*(1-2*x)).
2*a(n) = A153772(n+1).
a(2n+1) - a(2n) = A047849(n).
a(2n+1) = A020988(n); a(2n+2) = 2*A020988(n).
a(n+2) = 2*A000975(n).
a(2n+2) = a(2n) + 2^(2n).
E.g.f.: (1/3)*(exp(2*x) - 3*exp(x) - exp(-x)). - G. C. Greubel, May 30 2016

Extensions

Edited by R. J. Mathar, Dec 17 2010