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.

A320933 a(n) = 2^n - floor((n+3)/2).

Original entry on oeis.org

0, 0, 2, 5, 13, 28, 60, 123, 251, 506, 1018, 2041, 4089, 8184, 16376, 32759, 65527, 131062, 262134, 524277, 1048565, 2097140, 4194292, 8388595, 16777203, 33554418, 67108850, 134217713, 268435441, 536870896
Offset: 0

Views

Author

Paul Curtz, Oct 28 2018

Keywords

Comments

The sequence 0, 0, a(n) is an autosequence of the second kind. The difference table is:
0, 0, 0, 0, 2, 5, 13, ...
0, 0, 0, 2, 3, 8, 15, ...
0, 0, 2, 1, 5, 7, 17, ...
0, 2, -1, 4, 2, 10, 14, ...
2, -3, 5, -2, 8, 4, 20, ...
-5, 8, -7, 10, -4, 16, 8, ...
13, -15, 17, -14, 20, -8, 32, ...
etc.

Crossrefs

Programs

  • GAP
    List([0..40],n->2^n-Int((n+3)/2)); # Muniru A Asiru, Oct 28 2018
    
  • Magma
    [((-1)^n+2^(n+2)-2*n-5)/4: n in [0..40]]; // G. C. Greubel, Jun 04 2019
    
  • Maple
    seq(2^n-floor((n+3)/2),n=0..40); # Muniru A Asiru, Oct 28 2018
  • Mathematica
    a[n_]:=2^n - Floor[(n+3)/2]; Array[a, 40, 0] (* or *) CoefficientList[ Series[x^2*(2-x)/((1-x)^2*(1-x-2*x^2)), {x, 0, 40}], x] (* Stefano Spezia, Oct 28 2018 *)
  • PARI
    concat([0,0], Vec(x^2*(2-x)/((1-x)^2*(1+x)*(1-2*x)) + O(x^40))) \\ Colin Barker, Oct 28 2018
    
  • Sage
    [((-1)^n+2^(n+2)-2*n-5)/4 for n in (0..40)] # G. C. Greubel, Jun 04 2019

Formula

a(n) = 3*a(n-1) - a(n-2) - 3*a(n-3) + a(n-4).
a(n+1) = a(n) + A166920(n).
a(n+4) - a(n) = 13, 28, 58, 118, ... = 15*2^n - 2 = A060182(n+2).
With b(n) = 0, 0, 0, A011377(n) = 0, 0, 0, 1, 3, 8, 18, ..., then a(n) = 2*b(n+1) - b(n).
a(n+2) - 2*a(n+1) + a(n) = A014551(n).
G.f.: x^2*(2 - x)/((1-x)^2*(1 - x - 2*x^2)). - Stefano Spezia, Oct 28 2018
a(n) = ((-1)^n + 2^(n+2) - 2*n - 5) / 4. - Colin Barker, Oct 28 2018

Extensions

Three terms corrected by Colin Barker, Oct 28 2018
Showing 1-1 of 1 results.