cp's OEIS Frontend

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.

A001148 Final digit of 3^n.

This page as a plain text file.
%I A001148 #51 Dec 14 2023 06:16:44
%S A001148 1,3,9,7,1,3,9,7,1,3,9,7,1,3,9,7,1,3,9,7,1,3,9,7,1,3,9,7,1,3,9,7,1,3,
%T A001148 9,7,1,3,9,7,1,3,9,7,1,3,9,7,1,3,9,7,1,3,9,7,1,3,9,7,1,3,9,7,1,3,9,7,
%U A001148 1,3,9,7,1,3,9,7,1,3,9,7,1
%N A001148 Final digit of 3^n.
%C A001148 Let G = {1,3,7,9}, and let the binary operator o be defined as: X o Y = least significant digit of the product XY, where X,Y belong to G. Then (G,o) is an Abelian group and 3 is a generator of this group. - _K.V.Iyer_, Apr 19 2009
%C A001148 3^n mod 10 and 3^n mod 20. - _Zerinvary Lajos_, Nov 25 2009
%C A001148 Continued fraction expansion of (243+17*sqrt(285))/4020 = 0.13183906... (see A178148). - _Klaus Brockhaus_, Apr 17 2011
%H A001148 <a href="/index/Ca#CARRYLESS">Index entries for sequences related to carryless arithmetic</a>
%H A001148 <a href="/index/Fi#final">Index entries for sequences related to final digits of numbers</a>
%H A001148 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (1,-1,1).
%F A001148 Periodic with period 4.
%F A001148 From _R. J. Mathar_, Apr 13 2010: (Start)
%F A001148 a(n) = a(n-1) - a(n-2) + a(n-3).
%F A001148 G.f.: (1+2*x+7*x^2)/ ((1-x) * (1+x^2)). (End)
%F A001148 a(n) = 5 - (2+i)*(-i)^n - (2-i)*i^n, where i is the imaginary unit. Also a(n) = A001903(A159966(n)). - _Bruno Berselli_, Feb 08 2011
%F A001148 a(0)=1, a(1)=3, a(n) = 10 - a(n-2). - _Vincenzo Librandi_, Feb 08 2011
%t A001148 Table[PowerMod[3, n, 10], {n, 0, 200}] (* _Vladimir Joseph Stephan Orlovsky_, Jun 10 2011 *)
%o A001148 (Sage) [power_mod(3, n, 10) for n in range(0, 81)] # _Zerinvary Lajos_, Nov 24 2009
%o A001148 (Magma) [3^n mod 10: n in [0..150]]; // _Vincenzo Librandi_, Apr 12 2011
%o A001148 (PARI) a(n)=[1, 3, 9, 7][n%4+1] \\ _Charles R Greathouse IV_, Dec 27 2012
%K A001148 nonn,cofr,easy
%O A001148 0,2
%A A001148 _N. J. A. Sloane_