A168399 a(n) = 3^n mod 13.
1, 3, 9, 1, 3, 9, 1, 3, 9, 1, 3, 9, 1, 3, 9, 1, 3, 9, 1, 3, 9, 1, 3, 9, 1, 3, 9, 1, 3, 9, 1, 3, 9, 1, 3, 9, 1, 3, 9, 1, 3, 9, 1, 3, 9, 1, 3, 9, 1, 3, 9, 1, 3, 9, 1, 3, 9, 1, 3, 9, 1, 3, 9, 1, 3, 9, 1, 3, 9, 1, 3, 9, 1, 3, 9, 1, 3, 9, 1, 3, 9, 1, 3, 9, 1, 3, 9, 1, 3, 9, 1, 3, 9
Offset: 0
Links
- Index entries for linear recurrences with constant coefficients, signature (0,0,1).
Programs
-
Magma
[Modexp(3, n, 13): n in [0..110]]; // Vincenzo Librandi, Jul 21 2016
-
Mathematica
Table[Mod[3^n,13], {n,0,50}] (* G. C. Greubel, Jul 20 2016 *)
-
PARI
a(n)=lift(Mod(3,13)^n) \\ Charles R Greathouse IV, Mar 22 2016
-
Sage
[power_mod(3, n, 13)for n in range(0, 93)] #
Formula
From R. J. Mathar, Apr 13 2010: (Start)
a(n) = a(n-3).
G.f.: (1 + 3*x + 9*x^2)/ ((1-x)*(1+x+x^2)). (End)
Comments