login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A008960 Final digit of cubes: n^3 mod 10. 16

%I #59 Dec 18 2023 12:16:58

%S 0,1,8,7,4,5,6,3,2,9,0,1,8,7,4,5,6,3,2,9,0,1,8,7,4,5,6,3,2,9,0,1,8,7,

%T 4,5,6,3,2,9,0,1,8,7,4,5,6,3,2,9,0,1,8,7,4,5,6,3,2,9,0,1,8,7,4,5,6,3,

%U 2,9,0,1,8,7,4,5,6,3,2,9,0,1,8,7,4,5

%N Final digit of cubes: n^3 mod 10.

%C Decimal expansion of 208284810/1111111111. - _Alexander R. Povolotsky_, Mar 08 2013

%H Vincenzo Librandi, <a href="/A008960/b008960.txt">Table of n, a(n) for n = 0..5000</a>

%H <a href="/index/Fi#final">Index entries for sequences related to final digits of numbers</a>

%H <a href="/index/Rec#order_10">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,0,0,0,0,0,0,1).

%F Periodic with period 10. - _Franklin T. Adams-Watters_, Mar 13 2006

%F a(n) = 4.5 -cos(Pi*n/5) +(1/2*(-(5-5^(1/2))^(1/2) +(5+5^(1/2))^(1/2))*2^(1/2))*sin(Pi*n/5) -cos(2*Pi*n/5) +(-1/10*(-(5-5^(1/2))^(1/2)+3*(5+5^(1/2))^(1/2))*2^(1/2))*sin(2*Pi*n/5) -cos(3*Pi*n/5) +(-1/2*((5-5^(1/2))^(1/2) +(5+5^(1/2))^(1/2))*2^(1/2))*sin(3*Pi*n/5) -cos(4*Pi*n/5) +( -1/10*(3*(5-5^(1/2))^(1/2) +(5 +5^(1/2))^(1/2))*2^(1/2))*sin(4*Pi*n/5) -0.5*(-1)^n. - _Richard Choulet_, Dec 12 2008

%F a(n) = n^k mod 10; for k > 0 where k mod 4 = 3. - _Doug Bell_, Jun 15 2015

%F G.f.: x*(1+8*x+7*x^2+4*x^3+5*x^4+6*x^5+3*x^6+2*x^7+9*x^8) / ((1-x)*(1+x)*(1-x+x^2-x^3+x^4)*(1+x+x^2+x^3+x^4)). - _Colin Barker_, Nov 30 2015

%t Table[Mod[n^3,10],{n,0,200}] (* _Vladimir Joseph Stephan Orlovsky_, Apr 23 2011 *)

%t LinearRecurrence[{0, 0, 0, 0, 0, 0, 0, 0, 0, 1},{0, 1, 8, 7, 4, 5, 6, 3, 2, 9},81] (* _Ray Chandler_, Aug 26 2015 *)

%o (Sage) [power_mod(n,3,10 ) for n in range(0, 81)] # _Zerinvary Lajos_, Oct 29 2009

%o (PARI) a(n)=n^3%10 \\ _Charles R Greathouse IV_, Mar 08 2013

%o (Magma) [n^3 mod 10: n in [0..80]]; // _Vincenzo Librandi_, Mar 26 2013

%o (PARI) concat(0, Vec(x*(1+8*x+7*x^2+4*x^3+5*x^4+6*x^5+3*x^6+2*x^7+9*x^8) / ((1-x)*(1+x)*(1-x+x^2-x^3+x^4)*(1+x+x^2+x^3+x^4)) + O(x^100))) \\ _Colin Barker_, Nov 30 2015

%Y Cf. A167176.

%Y Cf. A010879, A008959, A070514. - _Doug Bell_, Jun 15 2015

%K nonn,easy,base

%O 0,3

%A _N. J. A. Sloane_

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 08:59 EDT 2024. Contains 371935 sequences. (Running on oeis4.)