OFFSET
1,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (4,0,1,-4).
FORMULA
a(n) = floor(4^(n+1)/7). - Mircea Merca, Dec 26 2010
G.f.: x*(2+x) / ( (1-x)*(1-4*x)*(1+x+x^2) ).
a(n) = 4*a(n-1) + a(n-3) - 4*a(n-4).
a(n) = 4^(n+1)/7 - 1/3 - (-1)^(n mod 3)*A167380(4 + (n mod 3))/21 = 2*A033140(n) + A033140(n-1). - R. J. Mathar, Jan 08 2011
MAPLE
seq(floor(4^(n+1)/7), n=1..30); # Mircea Merca, Dec 26 2010
MATHEMATICA
Table[FromDigits[PadRight[{}, n, {2, 1, 0}], 4], {n, 30}] (* Harvey P. Dale, Jul 03 2017 *)
PROG
(Magma) [Floor(4^(n+1)/7) : n in [1..30]]; // Vincenzo Librandi, Jun 25 2011
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
STATUS
approved