OFFSET
1,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..300
Index entries for linear recurrences with constant coefficients, signature (4,0,1,-4).
FORMULA
a(n) = floor(4^(n+1)/9). - Mircea Merca, Dec 26 2010
From Joerg Arndt, Jan 08 2011: (Start)
G.f.: x*(1+3*x) / ( (x-1)*(4*x-1)*(1+x+x^2) ).
a(n) = 4*a(n-1) + a(n-3) - 4*a(n-4). (End)
a(1)=1, a(2)=7, a(n) = 5*a(n-1) - 4*a(n-2) + (period 3: repeat -3, 1, 2). - Vincenzo Librandi, Jun 06 2011
E.g.f.: 2*(2*exp(x)*(exp(3*x) - 1) - sqrt(3)*exp(-x/2)*sin(sqrt(3)*x/x))/9. - Stefano Spezia, Oct 02 2023
MAPLE
seq(floor(4^(n+1)/9), n=1..32); # Mircea Merca, Dec 28 2010
PROG
(Magma) [Floor(4^(n+1)/9): n in [1..30]]; // Vincenzo Librandi, May 22 2011
(PARI) a(n)=4^(n+1)\9 \\ Charles R Greathouse IV, Jun 06 2011
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
STATUS
approved