OFFSET
0,2
REFERENCES
I. M. Vinogradov, Elements of Number Theory, pp. 220 ff.
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..10000
Index entries for linear recurrences with constant coefficients, signature (1,0,0,0,0,0,0,-1,1).
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
KEYWORD
nonn,easy
AUTHOR
STATUS
approved