login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A036119
a(n) = 3^n mod 17.
3
1, 3, 9, 10, 13, 5, 15, 11, 16, 14, 8, 7, 4, 12, 2, 6, 1, 3, 9, 10, 13, 5, 15, 11, 16, 14, 8, 7, 4, 12, 2, 6, 1, 3, 9, 10, 13, 5, 15, 11, 16, 14, 8, 7, 4, 12, 2, 6, 1, 3, 9, 10, 13, 5, 15, 11, 16, 14, 8, 7, 4, 12, 2, 6, 1, 3, 9, 10
OFFSET
0,2
REFERENCES
I. M. Vinogradov, Elements of Number Theory, pp. 220 ff.
FORMULA
G.f.: (1 + 2*x + 6*x^2 + x^3 + 3*x^4 - 8*x^5 + 10*x^6 - 4*x^7 + 6*x^8)/ ((1-x) * (1+x^8)). - R. J. Mathar, Apr 13 2010
a(n) = a(n-1) - a(n-8) + a(n-9). - R. J. Mathar, Apr 13 2010
a(n) = a(n-16). - Vincenzo Librandi, Mar 26 2016
a(n) = 17 - a(n+8) for all n in Z. - Michael Somos, Oct 17 2018
MAPLE
i := pi(17) ; [ seq(primroot(ithprime(i))^j mod ithprime(i), j=0..100) ];
MATHEMATICA
PowerMod[3, Range[0, 100], 17] (* Vincenzo Librandi, Mar 26 2016 *)
PROG
(Sage) [power_mod(3, n, 17)for n in range(0, 68)] # Zerinvary Lajos, Nov 25 2009
(PARI) a(n)=lift(Mod(3, 17)^n) \\ Charles R Greathouse IV, Mar 22 2016
(Magma) [Modexp(3, n, 17): n in [0..100]]; // Bruno Berselli, Mar 23 2016
(Python) for n in range(0, 100): print(int(pow(3, n, 17)), end=' ') # Stefano Spezia, Oct 17 2018
(GAP) List([0..55], n->PowerMod(3, n, 17)); # Muniru A Asiru, Oct 17 2018
CROSSREFS
Cf. A000244 (3^n).
Sequence in context: A030354 A108865 A319497 * A211185 A229269 A363954
KEYWORD
nonn,easy
STATUS
approved