login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A014391 Final digit of 8^n. 2
1, 8, 4, 2, 6, 8, 4, 2, 6, 8, 4, 2, 6, 8, 4, 2, 6, 8, 4, 2, 6, 8, 4, 2, 6, 8, 4, 2, 6, 8, 4, 2, 6, 8, 4, 2, 6, 8, 4, 2, 6, 8, 4, 2, 6, 8, 4, 2, 6, 8, 4, 2, 6, 8, 4, 2, 6, 8, 4, 2, 6, 8, 4, 2, 6, 8, 4, 2, 6, 8, 4, 2, 6, 8, 4, 2, 6, 8, 4, 2, 6 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
LINKS
FORMULA
a(n) = 8^n mod 10. [Zerinvary Lajos, Nov 27 2009]
G.f.: -(7*x - 3*x^2 + 5*x^3 + 1)/ ((x - 1)*(1 + x^2)). [R. J. Mathar, Apr 20 2010]
a(n) = +a(n-1) -a(n-2) +a(n-3). [R. J. Mathar, Apr 20 2010]
MATHEMATICA
Table[PowerMod[8, n, 10], {n, 0, 200}] (* Vladimir Joseph Stephan Orlovsky, Jun 10 2011 *)
LinearRecurrence[{1, -1, 1}, {1, 8, 4, 2}, 100] (* Harvey P. Dale, Jul 01 2019 *)
PROG
(Sage) [power_mod(8, n, 10)for n in range(0, 105)] # Zerinvary Lajos, Nov 27 2009
(PARI) a(n)=lift(Mod(8, 10)^n) \\ Charles R Greathouse IV, Dec 29 2012
(Magma) [Modexp(8, n, 10): n in [0..100]]; // Vincenzo Librandi, Jun 30 2016
CROSSREFS
Sequence in context: A010523 A231534 A348908 * A099286 A089729 A173670
KEYWORD
nonn,easy
AUTHOR
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 05:18 EDT 2024. Contains 371964 sequences. (Running on oeis4.)