A220468 Number of cyclotomic cosets of n mod 10.
1, 10, 2, 4, 3, 2, 5, 4, 2, 6, 1, 10, 2, 4, 3, 2, 5, 4, 2, 6, 1, 10, 2, 4, 3, 2, 5, 4, 2, 6, 1, 10, 2, 4, 3, 2, 5, 4, 2, 6, 1, 10, 2, 4, 3, 2, 5, 4, 2, 6, 1, 10, 2, 4, 3, 2, 5, 4, 2, 6, 1, 10, 2, 4, 3, 2, 5, 4, 2, 6, 1, 10, 2, 4, 3, 2, 5, 4, 2, 6, 1, 10, 2, 4, 3, 2, 5, 4, 2, 6
Offset: 0
Examples
The following are the different cycles obtained by repeatedly multiplying by n, and then taking mod 10, with different starting elements. n = 0: {0}. n = 1: {0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, {9}. n = 2: {2, 4, 8, 6}, {0}. n = 3: {1, 3, 9, 7}, {2, 6, 8, 4}, {5}, {0}. n = 4: {4, 6}, {2, 8}, {0}. n = 5: {5}, {0}. n = 6: {2}, {4}, {6}, {8}, {0}. n = 7: {1, 7, 9, 3}, {2, 4, 8, 6}, {5}, {0}. n = 8: {8, 4, 2, 6}, {0}. n = 9: {1, 9}, {3, 7}, {2, 8}, {4, 6}, {5}, {0}.
Links
- Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,0,0,0,0,0,1).
Programs
-
Mathematica
iter[n_] := Table[ FixedPoint[ Union[#, Mod[n*#, 10]] &, {m}], {m, 0, 9}]; classes[n_] := iter[n] //. {a___List, b_List, c___List, d_List, e___List} /; Intersection[b, d] != {} :> {a, Union[b, d], c, e}; a[n_] := Length[classes[n]]; Table[a[n], {n, 0, 89}] (* Jean-François Alcover, Jan 08 2013 *)
-
PARI
k=10; j=1; for(i=0, 100, m=0; n=vector(k, X, -1); for(l=0, k-1, if(n[((l*i^j)%k)+1]>=0, n[l+1]=n[((l*i^j)%k)+1]; continue, n[l+1]=m; p=l; for(o=1, eulerphi(k), p=(p*i)%k; if(n[p+1]>-1, break); n[p+1]=m); m++)); print1(m", "))
-
PARI
a(n)=[1, 10, 2, 4, 3, 2, 5, 4, 2, 6][n%10+1] \\ Charles R Greathouse IV, Jan 08 2013
Formula
G.f.: -(6*x^9+2*x^8+4*x^7+5*x^6+2*x^5+3*x^4+4*x^3+2*x^2+10*x+1) / (x^10-1). - Colin Barker, Apr 13 2013
Comments