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”).

A070366
a(n) = 5^n mod 9.
15
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,2
COMMENTS
Period 6: repeat [1, 5, 7, 8, 4, 2].
Also the digital root of 5^n. - Cino Hilliard, Dec 31 2004
Digital root of the powers of any number congruent to 5 mod 9. - Alonso del Arte, Jan 26 2014
REFERENCES
Cecil Balmond, Number 9: The Search for the Sigma Code. Munich, New York: Prestel (1998): 203.
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
a(n) = A010878(A000351(n)). - Michel Marcus, Feb 20 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
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 *)
PROG
(PARI) a(n)=lift(Mod(5, 9)^n); \\ Charles R Greathouse IV, Sep 24 2015
(Magma) [Modexp(5, n, 9): n in [0..100]]; // Wesley Ivan Hurt, Jun 28 2016
CROSSREFS
Cf. Digital roots of powers of c mod 9: c = 2, A153130; c = 4, A100402; c = 7, A070403; c = 8, A010689.
Sequence in context: A374771 A245278 A155855 * A339986 A141606 A354051
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, May 12 2002
STATUS
approved