OFFSET
0,5
COMMENTS
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..8000
Index entries for linear recurrences with constant coefficients, signature (0, 0, 0, 3).
FORMULA
a(n) = 3^floor(n/4).
O.g.f.: -(1+x)*(1+x^2)/(-1+3*x^4). - R. J. Mathar, Jan 08 2008
EXAMPLE
a(10) = 3^floor(10/4) = 3^2 = 9.
MATHEMATICA
With[{pt=3^Range[0, 15]}, Sort[Join[pt, pt, pt, pt]]] (* Harvey P. Dale, Sep 17 2011 *)
Table[PadRight[{}, 4, 3^n], {n, 0, 15}]//Flatten (* Harvey P. Dale, Jan 17 2019 *)
PROG
(Magma) [3^(Floor(n/4)):n in [0..50]]; // Vincenzo Librandi, Sep 20 2011
(PARI) a(n)=3^(n\4) \\ Charles R Greathouse IV, Oct 03 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Jeremy Gardiner, Nov 17 2005
STATUS
approved