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.

A153772 a(n) = (2^n + 2*(-1)^n - 6)/3.

Original entry on oeis.org

-1, -2, 0, 0, 4, 8, 20, 40, 84, 168, 340, 680, 1364, 2728, 5460, 10920, 21844, 43688, 87380, 174760, 349524, 699048, 1398100, 2796200, 5592404, 11184808, 22369620, 44739240, 89478484, 178956968, 357913940, 715827880
Offset: 0

Views

Author

Paul Curtz, Jan 01 2009

Keywords

Comments

The array of T(n,k) with T(0,k) = A141325(k) and successive differences T(n,k) = T(n-1,k+1) - T(n-1,k) in further rows is
1, 1, 1, 1, 3, 5, 9, 13, 21, 33, 55,..
0, 0, 0, 2, 2, 4, 4, 8, 12, 22,..
0, 0, 2, 0, 2, 0, 4, 4, 10,...
0, 2, -2, 2, -2, 4, 0, 6,..
2, -4, 4, -4, 6, -4, 6,..
-6, 8, -8, 10, -10, 10,...
with T(n,n) = A078008(n), T(n,n+1) = -A167030(n), T(n,n+2) = A128209(n), T(n,n+3) = -a(n). All these sequences along the diagonals obey the recurrences a(n) = 2*a(n-1) + a(n-2) - 2*a(n-3) and a(n) = 5*a(n-2) - 4*a(n-4).
Conjecture: For n >= 6, a(n) is the third largest natural number whose Collatz orbit has length n+2. - Markus Sigg, Sep 14 2020

Crossrefs

Programs

  • Magma
    [2^n/3 +2*(-1)^n/3-2: n in [0..40]]; // Vincenzo Librandi, Aug 07 2011
    
  • Mathematica
    Table[(2^n + 2*(-1)^n - 6)/3, {n,0,25}] (* or *) LinearRecurrence[{2, 1, -2}, {-1, -2, 0}, 25] (* G. C. Greubel, Aug 27 2016 *)
  • PARI
    a(n)=(2^n+2*(-1)^n-6)/3 \\ Charles R Greathouse IV, Aug 28 2016

Formula

a(n) = A078008(n) - 2.
a(n) = +2*a(n-1) +a(n-2) -2*a(n-3).
a(n) = a(n-1) + 2*a(n-2) + 4.
G.f.: (1 - 5*x^2) / ( (1-x)*(2*x-1)*(1+x) ).
E.g.f.: (1/3)*(2*exp(-x) - 6*exp(x) + exp(2*x)). - G. C. Greubel, Aug 27 2016
a(n) = 4*A000975(n-3) for n >= 3. - Markus Sigg, Sep 14 2020