VOOZH
about
URL: https://oeis.org/A014391
⇱ A014391 - OEIS
login
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
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]
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
(SageMath) [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
Adjacent sequences:
A014388
A014389
A014390
*
A014392
A014393
A014394
KEYWORD
nonn
,
easy
AUTHOR
N. J. A. Sloane
STATUS
approved