login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A014391 Final digit of 8^n. 0
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; internal format)
OFFSET

0,2

COMMENTS

8^n mod 10. [From Zerinvary Lajos (zerinvarylajos(AT)yahoo.com), Nov 27 2009]

LINKS

Index entries for sequences related to final digits of numbers

Index to sequences with linear recurrences with constant coefficients, signature (1,-1,1). [From R. J. Mathar (mathar(AT)strw.leidenuniv.nl), Apr 20 2010]

FORMULA

a(n)=(1/6)*{-(n mod 4)+8*[(n+1) mod 4]+11*[(n+2) mod 4]+2*[(n+3) mod 4]}-5*[C(2*n,n) mod 2], with n>=0 [From Paolo P. Lava (paoloplava(AT)gmail.com), Apr 16 2010]

a(n) = +a(n-1) -a(n-2) +a(n-3). G.f.: -(7*x-3*x^2+5*x^3+1)/ ((x-1) * (1+x^2)). [From R. J. Mathar (mathar(AT)strw.leidenuniv.nl), Apr 20 2010]

MATHEMATICA

Table[PowerMod[8, n, 10], {n, 0, 200}] (* From Vladimir Joseph Stephan Orlovsky, Jun 10 2011 *)

PROG

(Other) sage: [power_mod(8, n, 10)for n in xrange(0, 105)] # [From Zerinvary Lajos (zerinvarylajos(AT)yahoo.com), Nov 27 2009]

(MAGMA) [8^n mod 10: n in [0..150]]; // Vincenzo Librandi, Apr 12 2011

CROSSREFS

Sequence in context: A154434 A198353 A010523 * A099286 A089729 A173670

Adjacent sequences:  A014388 A014389 A014390 * A014392 A014393 A014394

KEYWORD

nonn

AUTHOR

N. J. A. Sloane (njas(AT)research.att.com).

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 14 14:07 EST 2012. Contains 205623 sequences.