A070366 a(n) = 5^n mod 9.
1, 5, 7, 8, 4, 2, 1, 5, 7, 8, 4, 2, 1, 5, 7, 8, 4, 2, 1, 5, 7, 8, 4, 2, 1, 5, 7, 8, 4, 2, 1, 5, 7, 8, 4, 2, 1, 5, 7, 8, 4, 2, 1, 5, 7, 8, 4, 2, 1, 5, 7, 8, 4, 2, 1, 5, 7, 8, 4, 2, 1, 5, 7, 8, 4, 2, 1, 5, 7, 8, 4, 2, 1, 5, 7, 8, 4, 2, 1, 5, 7, 8, 4, 2, 1, 5, 7, 8, 4, 2, 1, 5, 7, 8, 4, 2, 1, 5, 7, 8, 4, 2, 1, 5, 7
Offset: 0
References
- Cecil Balmond, Number 9: The Search for the Sigma Code. Munich, New York: Prestel (1998): 203.
Links
- G. C. Greubel, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (1,0,-1,1).
Crossrefs
Programs
-
Magma
[Modexp(5, n, 9): n in [0..100]]; // Wesley Ivan Hurt, Jun 28 2016
-
Maple
A070366:=n->power(5,n) mod 9: seq(A070366(n), n=0..100); # Wesley Ivan Hurt, Jun 28 2016
-
Mathematica
PowerMod[5, Range[0, 120], 9] (* Harvey P. Dale, Mar 27 2011 *) Table[Mod[5^n, 9], {n, 0, 100}] (* G. C. Greubel, Mar 05 2016 *)
-
PARI
a(n)=lift(Mod(5,9)^n); \\ Charles R Greathouse IV, Sep 24 2015
Formula
From R. J. Mathar, Apr 20 2010: (Start)
a(n) = a(n-1) - a(n-3) + a(n-4) for n>3.
G.f.: ( 1+4*x+2*x^2+2*x^3 ) / ( (1-x)*(1+x)*(x^2-x+1) ). (End)
a(n) = 1/2^n (mod 9), n >= 0. - Wolfdieter Lang, Feb 18 2014
From G. C. Greubel, Mar 05 2016: (Start)
a(n) = a(n-6) for n>5.
E.g.f.: (1/2)*(9*exp(x) - 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) = (9 - cos(n*Pi) - 6*cos(n*Pi/3) + 2*sqrt(3)*sin(n*Pi/3))/2. - Wesley Ivan Hurt, Jun 28 2016
a(n) = 2^((-n) mod 6) mod 9. - Joe Slater, Mar 23 2017
Comments