OFFSET
0,2
COMMENTS
Period 6: repeat [1, 5, 11, 13, 9, 3].
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (2,-2,1).
FORMULA
a(n) = 2*a(n-1) - 2*a(n-2) + a(n-3) for n>2. R. J. Mathar, Apr 20 2010
G.f.: ( 1+3*x+3*x^2 ) / ( (1-x)*(x^2-x+1) ). R. J. Mathar, Apr 20 2010
From G. C. Greubel, Mar 05 2016: (Start)
a(n) = a(n-6) for n>5.
E.g.f.: 7*exp(x) + (2/sqrt(3))*exp(x/2)*sin(sqrt(3)*x/2) - 6*exp(x/2)*cos(sqrt(3)*x/2). (End)
a(n) = (21 - 18*cos(n*Pi/3) + 2*sqrt(3)*sin(n*Pi/3))/3. - Wesley Ivan Hurt, Jun 27 2016
MAPLE
MATHEMATICA
Table[Mod[5^n, 14], {n, 0, 100}] (* G. C. Greubel, Mar 05 2016 *)
PROG
(Sage) [power_mod(5, n, 14)for n in range(0, 90)] # Zerinvary Lajos, Nov 26 2009
(PARI) a(n) = lift(Mod(5, 14)^n); \\ Michel Marcus, Mar 05 2016
(Magma) [Modexp(5, n, 14): n in [0..100]]; // Wesley Ivan Hurt, Jun 27 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, May 12 2002
STATUS
approved