This site is supported by donations to The OEIS Foundation.

 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!)
 A008959 Final digit of squares: n^2 mod 10. 18
 0, 1, 4, 9, 6, 5, 6, 9, 4, 1, 0, 1, 4, 9, 6, 5, 6, 9, 4, 1, 0, 1, 4, 9, 6, 5, 6, 9, 4, 1, 0, 1, 4, 9, 6, 5, 6, 9, 4, 1, 0, 1, 4, 9, 6, 5, 6, 9, 4, 1, 0, 1, 4, 9, 6, 5, 6, 9, 4, 1, 0, 1, 4, 9, 6, 5, 6, 9, 4, 1, 0, 1, 4, 9, 6, 5, 6, 9, 4, 1, 0 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,3 COMMENTS a(m*n) = a(m)*a(n) mod 10; a(5*n+k) = a(5*n-k) for k <= 5*n. - Reinhard Zumkeller, Apr 24 2009 a(n) = n^6 mod 10. - Zerinvary Lajos, Nov 06 2009 a(n) = A002015(n) mod 10 = A174452(n) mod 10. - Reinhard Zumkeller, Mar 21 2010 Decimal expansion of 166285490/1111111111. - Alexander R. Povolotsky, Mar 09 2013 LINKS Harvey P. Dale, Table of n, a(n) for n = 0..1000 Index entries for linear recurrences with constant coefficients, signature (0, 0, 0, 0, 0, 0, 0, 0, 0, 1). FORMULA Periodic with period 10. - Franklin T. Adams-Watters, Mar 13 2006 a(n) = (1/5)*{(n mod 10)+2*[(n+1) mod 10]+3*[(n+2) mod 10]-[(n+3) mod 10]+[(n+5) mod 10]+2*[(n+6) mod 10]-2*[(n+7) mod 10]-[(n+8) mod 10]}. - Paolo P. Lava, Nov 24 2006 a(n) = 4.5 - (1 + 5^(1/2))*cos(Pi*n/5) + (-1 - 3/5*5^(1/2))*cos(2*Pi*n/5) + (5^(1/2) - 1)*cos(3*Pi*n/5) + (-1 + 3/5*5^(1/2))*cos(4*Pi*n/5) - 0.5*(-1)^n. - Richard Choulet, Dec 12 2008 a(n) = A010879(A000290(n)). - Reinhard Zumkeller, Jan 04 2009 G.f.: (x^9+4*x^8+9*x^7+6*x^6+5*x^5+6*x^4+9*x^3+4*x^2+x)/(-x^10+1). - Colin Barker, Aug 14 2012 a(n) = n^2 - 10*floor(n^2/10). - Wesley Ivan Hurt, Jun 12 2013 a(n) = (n - 5*A002266(n + 2))^2 + 5*(5*A002266(n + 2) mod 2). - Wesley Ivan Hurt, Jun 06 2014 a(n) = A033569(n+3) mod 10. - Wesley Ivan Hurt, Dec 06 2014 a(n) = n^k mod 10; for k > 0 where k mod 4 = 2. - Doug Bell, Jun 15 2015 MAPLE A008959:=n->(n^2 mod 10); seq(A008959(n), n=0..50); # Wesley Ivan Hurt, Jun 06 2014 MATHEMATICA Table[Mod[n^2, 10], {n, 0, 200}] (* Vladimir Joseph Stephan Orlovsky, Apr 21 2011 *) PowerMod[Range[0, 80], 2, 10] (* or *) LinearRecurrence[{0, 0, 0, 0, 0, 0, 0, 0, 0, 1}, {0, 1, 4, 9, 6, 5, 6, 9, 4, 1}, 120] (* Harvey P. Dale, Oct 16 2012 *) PROG (Sage) [power_mod(n, 2, 10) for n in xrange(0, 81)] # Zerinvary Lajos, Nov 06 2009 (MAGMA) [0] cat [Intseq(n^2)[1]: n in [1..80]]; // Bruno Berselli, Feb 14 2013 (MAGMA) [n^2 - 10*Floor(n^2/10): n in [0..80]]; // Vincenzo Librandi, Jun 16 2015 (PARI) a(n)=n^2%10 \\ Charles R Greathouse IV, Sep 24 2015 CROSSREFS Cf. A000290, A070431, A070435, A070438, A070442, A070452, A159852, A010879, A008960, A070514. Sequence in context: A094090 A200632 A186723 * A169917 A059729 A184988 Adjacent sequences:  A008956 A008957 A008958 * A008960 A008961 A008962 KEYWORD nonn,easy,base AUTHOR N. J. A. Sloane, Mar 15 1996 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.

Last modified November 21 22:32 EST 2017. Contains 295054 sequences.