|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
|
|
LINKS
|
Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,0,0,0,0,0,1).
|
|
FORMULA
|
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
|
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) 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
|
|
|
KEYWORD
|
nonn,easy,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|