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.
%I A220468 #75 Feb 14 2024 04:58:29 %S A220468 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, %T A220468 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, %U A220468 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 %N A220468 Number of cyclotomic cosets of n mod 10. %C A220468 In other words, number of different cycles mod 10 obtained by repeatedly multiplying by n, with different starting elements. There are four different cycles for n = 3: {1, 3, 9, 7}, {2, 6, 8, 4}, {5}, {0}. By starting with a random number below 10, the numbers obtained by repeatedly multiplying by 3 and then taking modulo 10 repeat through one of these four different cycles. %C A220468 There are two different cycles for n = 2: {2, 4, 8, 6}, {0}. Note that this does not cover all the positive integers less than 10. The elements 1, 3, 7, 9 belong to the cycle {2, 4, 8, 6} since on starting with them, the numbers obtained by the process of repeatedly multiplying by 2 and then taking modulo 10 repeat through the elements of this cycle. Likewise the element 5 belongs to the cycle {0}. For n coprime to 10, the different cycles will cover all the elements less than 10 and will form different equivalence classes by themselves. For other values of n, the cycles will not cover all the elements less than 10. %C A220468 This sequence is periodic with period of 10, since x^i == (x + 10)^i mod 10. %H A220468 <a href="/index/Rec#order_10">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,0,0,0,0,0,0,1). %F A220468 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 %e A220468 The following are the different cycles obtained by repeatedly multiplying by n, and then taking mod 10, with different starting elements. %e A220468 n = 0: {0}. %e A220468 n = 1: {0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, {9}. %e A220468 n = 2: {2, 4, 8, 6}, {0}. %e A220468 n = 3: {1, 3, 9, 7}, {2, 6, 8, 4}, {5}, {0}. %e A220468 n = 4: {4, 6}, {2, 8}, {0}. %e A220468 n = 5: {5}, {0}. %e A220468 n = 6: {2}, {4}, {6}, {8}, {0}. %e A220468 n = 7: {1, 7, 9, 3}, {2, 4, 8, 6}, {5}, {0}. %e A220468 n = 8: {8, 4, 2, 6}, {0}. %e A220468 n = 9: {1, 9}, {3, 7}, {2, 8}, {4, 6}, {5}, {0}. %t A220468 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 *) %o A220468 (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", ")) %o A220468 (PARI) a(n)=[1, 10, 2, 4, 3, 2, 5, 4, 2, 6][n%10+1] \\ _Charles R Greathouse IV_, Jan 08 2013 %Y A220468 Cf. A173635, A220022-A220026. %K A220468 nonn,base,less,easy %O A220468 0,2 %A A220468 _V. Raman_, Jan 03 2013