This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A014391 #39 Jul 08 2025 05:38:21 %S A014391 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, %T A014391 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, %U A014391 6,8,4,2,6,8,4,2,6,8,4,2,6 %N A014391 Final digit of 8^n. %H A014391 Vincenzo Librandi, <a href="/A014391/b014391.txt">Table of n, a(n) for n = 0..1000</a> %H A014391 <a href="/index/Fi#final">Index entries for sequences related to final digits of numbers</a> %H A014391 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (1,-1,1). %F A014391 a(n) = 8^n mod 10. [_Zerinvary Lajos_, Nov 27 2009] %F A014391 G.f.: -(7*x - 3*x^2 + 5*x^3 + 1)/ ((x - 1)*(1 + x^2)). [_R. J. Mathar_, Apr 20 2010] %F A014391 a(n) = +a(n-1) -a(n-2) +a(n-3). [_R. J. Mathar_, Apr 20 2010] %t A014391 Table[PowerMod[8, n, 10], {n, 0, 200}] (* _Vladimir Joseph Stephan Orlovsky_, Jun 10 2011 *) %t A014391 LinearRecurrence[{1,-1,1},{1,8,4,2},100] (* _Harvey P. Dale_, Jul 01 2019 *) %o A014391 (Sage) [power_mod(8,n,10)for n in range(0,105)] # _Zerinvary Lajos_, Nov 27 2009 %o A014391 (PARI) a(n)=lift(Mod(8,10)^n) \\ _Charles R Greathouse IV_, Dec 29 2012 %o A014391 (Magma) [Modexp(8, n, 10): n in [0..100]]; // _Vincenzo Librandi_, Jun 30 2016 %K A014391 nonn,easy %O A014391 0,2 %A A014391 _N. J. A. Sloane_