OFFSET
0,3
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.
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
OEIS Wiki, Autosequence
Index entries for linear recurrences with constant coefficients, signature (3,-1,-3,2).
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
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 *)
PROG
(GAP) List([0..40], n->2^n-Int((n+3)/2)); # Muniru A Asiru, 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
(Magma) [((-1)^n+2^(n+2)-2*n-5)/4: n in [0..40]]; // G. C. Greubel, Jun 04 2019
(Sage) [((-1)^n+2^(n+2)-2*n-5)/4 for n in (0..40)] # G. C. Greubel, Jun 04 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, Oct 28 2018
EXTENSIONS
Three terms corrected by Colin Barker, Oct 28 2018
STATUS
approved