OFFSET
0,1
COMMENTS
Sequence is identical to its third differences.
LINKS
FORMULA
a(n)-2^n = hexaperiodic 3, 0, -3, -3, 0, 3.
O.g.f: -(4 - 10*x + 7*x^2)/((2*x - 1)*(x^2 - x + 1)). - R. J. Mathar, Nov 30 2007
a(n) = 2^n + 3*A010892(n+1). - R. J. Mathar, Jul 20 2009
a(n) = (-1)^n*A146321(n + 1). - Andrew Howroyd, Jan 03 2020
MATHEMATICA
LinearRecurrence[{3, -3, 2}, {4, 2, 1}, 15] (* Ray Chandler, Sep 23 2015 *)
PROG
(PARI) Vec((4 - 10*x + 7*x^2)/((1 - 2*x)*(1 - x + x^2)) + O(x^40)) \\ Andrew Howroyd, Jan 03 2020
(Magma) a:=[4, 2, 1]; [n le 3 select a[n] else 3*Self(n-1) -3*Self(n-2)+2*Self(n-3):n in [1..35]]; // Marius A. Burtea, Jan 03 2020
(Magma) R<x>:=PowerSeriesRing(Integers(), 35); Coefficients(R!( (4 - 10*x + 7*x^2)/((1 - 2*x)*(1 - x + x^2)))); // Marius A. Burtea, Jan 03 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Paul Curtz, Nov 27 2007
EXTENSIONS
Terms a(15) and beyond from Andrew Howroyd, Jan 03 2020
STATUS
approved