login
A191272
Expansion of x*(4+5*x)/( (1-4*x)*(1 + x + x^2) ).
1
0, 4, 17, 63, 256, 1025, 4095, 16384, 65537, 262143, 1048576, 4194305, 16777215, 67108864, 268435457, 1073741823, 4294967296, 17179869185, 68719476735, 274877906944, 1099511627777, 4398046511103, 17592186044416, 70368744177665
OFFSET
0,2
FORMULA
G.f.: x*(4+5*x)/(1 - 3*x - 3*x^2 - 4*x^3).
a(n) = 4^n-A057078(n) = 4^n - (n-th element of periodic length 3 repeat 1, 0, -1)
a(n) = A024495(2*n) + A024495(1+2*n).
a(n+1) = 4*a(n) + (n-th element of periodic length 3 repeat 4, 1, -5).
a(n) = A052539(n) - A080425(n+1). - Bruno Berselli, Jun 06 2011
a(0)=0, a(1)=4, a(2)=17, a(n) = 3*a(n-1) + 3*a(n-2) + 4*a(n-3). - Harvey P. Dale, Jun 19 2011
a(n) = 4*a(n-1) + a(n-3) - 4*(n-4) (n>3). - Bruno Berselli, Jul 04 2011
MATHEMATICA
LinearRecurrence[{3, 3, 4}, {0, 4, 17}, 30] (* or *) CoefficientList[ Series[ x (4+5x)/((1-4x)(1+x+x^2)), {x, 0, 30}], x] (* Harvey P. Dale, Jun 19 2011 *)
PROG
(PARI) a(n)=4^n-[1, 0, -1][n%3+1] \\ Charles R Greathouse IV, Jun 06 2011
(Magma) m:=24; R<x>:=PowerSeriesRing(Integers(), m); [0] cat Coefficients(R!(x*(4+5*x)/((1-4*x)*(1+x+x^2)))); // Bruno Berselli, Jul 04 2011
(Maxima) makelist(coeff(taylor(x*(4+5*x)/((1-4*x)*(1+x+x^2)), x, 0, n), x, n), n, 0, 23); /* Bruno Berselli, Jun 06 2011 */
CROSSREFS
Sequence in context: A339286 A252815 A362593 * A122231 A119916 A209375
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, May 29 2011
STATUS
approved