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

 

Logo

Annual appeal: Please make a donation to keep the OEIS running! Over 6000 articles have referenced us, often saying "we discovered this result with the help of the OEIS".
Other ways to donate

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

Vincenzo Librandi, Table of n, a(n) for n = 0..1000

Index entries for sequences related to final digits of numbers

Index entries for linear recurrences with constant coefficients, signature (1,-1,1).

FORMULA

a(n) = 8^n mod 10. [Zerinvary Lajos, Nov 27 2009]

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). [Paolo P. Lava, Apr 16 2010]

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 *)

PROG

(Sage) [power_mod(8, n, 10)for n in xrange(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: A198353 A010523 A231534 * A099286 A089729 A173670

Adjacent sequences:  A014388 A014389 A014390 * A014392 A014393 A014394

KEYWORD

nonn,easy

AUTHOR

N. J. A. Sloane.

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy .

Last modified November 24 00:27 EST 2017. Contains 295164 sequences.