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.

A008960 Final digit of cubes: n^3 mod 10.

Original entry on oeis.org

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, 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, 2, 9, 0, 1, 8, 7, 4, 5, 6, 3, 2, 9, 0, 1, 8, 7, 4, 5
Offset: 0

Views

Author

Keywords

Comments

Decimal expansion of 208284810/1111111111. - Alexander R. Povolotsky, Mar 08 2013

Crossrefs

Cf. A167176.
Cf. A010879, A008959, A070514. - Doug Bell, Jun 15 2015

Programs

  • Magma
    [n^3 mod 10: n in [0..80]]; // Vincenzo Librandi, Mar 26 2013
    
  • Mathematica
    Table[Mod[n^3,10],{n,0,200}] (* Vladimir Joseph Stephan Orlovsky, Apr 23 2011 *)
    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 *)
  • PARI
    a(n)=n^3%10 \\ Charles R Greathouse IV, Mar 08 2013
    
  • 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
  • Sage
    [power_mod(n,3,10 ) for n in range(0, 81)] # Zerinvary Lajos, Oct 29 2009
    

Formula

Periodic with period 10. - Franklin T. Adams-Watters, Mar 13 2006
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
a(n) = n^k mod 10; for k > 0 where k mod 4 = 3. - Doug Bell, Jun 15 2015
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