[go: up one dir, main page]

login
A008960
Final digit of cubes: n^3 mod 10.
16
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,3
COMMENTS
Decimal expansion of 208284810/1111111111. - Alexander R. Povolotsky, Mar 08 2013
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
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 *)
PROG
(Sage) [power_mod(n, 3, 10 ) for n in range(0, 81)] # Zerinvary Lajos, Oct 29 2009
(PARI) a(n)=n^3%10 \\ Charles R Greathouse IV, Mar 08 2013
(Magma) [n^3 mod 10: n in [0..80]]; // Vincenzo Librandi, Mar 26 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
CROSSREFS
Cf. A167176.
Cf. A010879, A008959, A070514. - Doug Bell, Jun 15 2015
Sequence in context: A249136 A154815 A085848 * A077744 A111448 A169885
KEYWORD
nonn,easy,base
STATUS
approved