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.

Showing 1-5 of 5 results.

A220468 Number of cyclotomic cosets of n mod 10.

Original entry on oeis.org

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

Views

Author

V. Raman, Jan 03 2013

Keywords

Comments

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.
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.
This sequence is periodic with period of 10, since x^i == (x + 10)^i mod 10.

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}.
		

Crossrefs

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

A220026 The period with which the powers of n repeat mod 1000000.

Original entry on oeis.org

1, 1, 12500, 50000, 6250, 16, 3125, 5000, 12500, 25000, 1, 50000, 12500, 50000, 6250, 4, 3125, 12500, 2500, 50000, 1, 50000, 12500, 25000, 1250, 8, 625, 50000, 12500, 50000, 1, 6250, 2500, 12500, 6250, 16, 3125, 50000, 12500, 25000, 1, 25000, 12500, 10000, 6250
Offset: 0

Views

Author

V. Raman, Dec 15 2012

Keywords

Comments

a(n) will always be a divisor of Phi(1000000) = 400000.
This sequence is periodic with a period of 1000000 because n^i mod 1000000 = (n + 1000000)^i mod 1000000.
For the odd numbers n ending in {1, 3, 7, 9} which are coprime to 10, we can expect the powers of n mod 1000000 to loop back to 1, with the value of n^a(n) mod 1000000 = 1, but for the other numbers n that are not coprime to 10, they do not loop back to 1.
For the even numbers n ending in {2, 4, 6, 8}, n^a(n) mod 1000000 = 109376.
For the numbers n ending in 5, n^(16*i) mod 1000000 = 890625, for all i >= 1.
For the numbers n ending in 0, n^i mod 1000000 = 0, for all i >= 6.

Examples

			a(2) = 12500 since 2^i mod 1000000 = 2^(i + 12500) mod 1000000, for all i >= 6.
a(3) = 50000 since 3^i mod 1000000 = 3^(i + 50000) mod 1000000, for all i >= 0.
But a(7) = 5000 since 7^i mod 1000000 = 7^(i + 5000) mod 1000000, for all i >= 0.
		

Crossrefs

Cf. A173635 (period with which the powers of n repeat mod 10).
Cf. A220022 (period with which the powers of n repeat mod 100).

Programs

  • Mathematica
    Flatten[Table[s = Table[PowerMod[n, e, 1000000], {e, 2, 1000000}]; Union[Differences[Position[s, s[[5]]]]], {n, 0, 40}]] (* Vincenzo Librandi, Jan 26 2013 *)
  • PARI
    k=1000000; for(n=0, 100, x=(n^6)%k; y=(n^7)%k; z=1; while(x!=y, x=(x*n)%k; y=(y*n*n)%k; z++); print1(z", "))

A220023 The period with which the powers of n repeat mod 1000.

Original entry on oeis.org

1, 1, 100, 100, 50, 2, 25, 20, 100, 50, 1, 50, 100, 100, 50, 2, 25, 100, 20, 50, 1, 50, 100, 100, 10, 1, 5, 100, 100, 50, 1, 50, 20, 100, 50, 2, 25, 100, 100, 50, 1, 25, 100, 20, 50, 2, 25, 100, 100, 10, 1, 10, 100, 100, 50, 2, 25, 4, 100, 50, 1, 50, 100, 100
Offset: 0

Views

Author

V. Raman, Dec 15 2012

Keywords

Comments

a(n) will always be a divisor of Phi(1000) = 400.
This sequence is periodic with a period of 1000 because n^i mod 1000 = (n + 1000)^i mod 1000.
For the odd numbers n ending in {1, 3, 7, 9} which are coprime to 10, we can expect the powers of n mod 1000 to loop back to 1, with the value of n^a(n) mod 1000 = 1, but for the other numbers n that are not coprime to 10, they do not loop back to 1.
For the even numbers n ending in {2, 4, 6, 8}, n^a(n) mod 1000 = 376.
For the numbers n ending in 5, n^(2*i) mod 1000 = 625, for all i >= 2.
For the numbers n ending in 0, n^i mod 1000 = 0, for all i >= 3.

Examples

			a(2) = 100 since 2^i mod 1000 = 2^(i+100) mod 1000, for all i >= 3.
a(3) = 100 since 3^i mod 1000 = 3^(i+100) mod 1000, for all i >= 0.
But a(7) = 20 since 7^i mod 1000 = 7^(i+20) mod 1000, for all i >= 0.
		

Crossrefs

Cf. A173635 (period with which the powers of n repeat mod 10).
Cf. A220022 (period with which the powers of n repeat mod 100).

Programs

  • Mathematica
    Flatten[Table[s=Table[PowerMod[n, e, 1000], {e, 2, 1000}]; Union[Differences[Position[s, s[[2]]]]], {n, 0, 40}]] (* Vincenzo Librandi, Jan 26 2013 *)
  • PARI
    k=1000; for(n=0, 100, x=(n^3)%k; y=(n^4)%k; z=1; while(x!=y, x=(x*n)%k; y=(y*n*n)%k; z++); print1(z", "))

A220024 The period with which the powers of n repeat mod 10000.

Original entry on oeis.org

1, 1, 500, 500, 250, 4, 125, 100, 500, 250, 1, 500, 500, 500, 250, 2, 125, 500, 100, 500, 1, 500, 500, 500, 50, 2, 25, 500, 500, 500, 1, 250, 100, 500, 250, 4, 125, 500, 500, 250, 1, 250, 500, 100, 250, 4, 125, 500, 500, 50, 1, 100, 500, 500, 250, 2, 125, 20
Offset: 0

Views

Author

V. Raman, Dec 15 2012

Keywords

Comments

a(n) will always be a divisor of Phi(10000) = 4000.
This sequence is periodic with a period of 10000 because n^i mod 10000 = (n + 10000)^i mod 10000.
For the odd numbers n ending in {1, 3, 7, 9} which are coprime to 10, we can expect the powers of n mod 10000 to loop back to 1, with the value of n^a(n) mod 10000 = 1, but for the other numbers n that are not coprime to 10, they do not loop back to 1.
For the even numbers n ending in {2, 4, 6, 8}, n^a(n) mod 10000 = 9376.
For the numbers n ending in 5, n^(4*i) mod 10000 = 625, for all i >= 1.
For the numbers n ending in 0, n^i mod 10000 = 0, for all i >= 4.

Examples

			a(2) = 500 since 2^i mod 10000 = 2^(i + 500) mod 10000, for all i >= 4.
a(3) = 500 since 3^i mod 10000 = 3^(i + 500) mod 10000, for all i >= 0.
But a(7) = 100 since 7^i mod 10000 = 7^(i + 100) mod 10000, for all i >= 0.
		

Crossrefs

Cf. A173635 (period with which the powers of n repeat mod 10).
Cf. A220022 (period with which the powers of n repeat mod 100).

Programs

  • Mathematica
    Flatten[Table[s = Table[PowerMod[n, e, 10000], {e, 2, 10000}]; Union[Differences[Position[s, s[[3]]]]], {n, 0, 40}]] (* Vincenzo Librandi, Jan 26 2013 *)
    Table[Length[FindTransientRepeat[PowerMod[n,Range[3000],10000],3] [[2]]],{n,0,60}] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Nov 08 2016 *)
  • PARI
    k=10000; for(n=0, 100, x=(n^4)%k; y=(n^5)%k; z=1; while(x!=y, x=(x*n)%k; y=(y*n*n)%k; z++); print1(z", "))

A220025 The period with which the powers of n repeat mod 100000.

Original entry on oeis.org

1, 1, 2500, 5000, 1250, 8, 625, 500, 2500, 2500, 1, 5000, 2500, 5000, 1250, 2, 625, 2500, 500, 5000, 1, 5000, 2500, 2500, 250, 4, 125, 5000, 2500, 5000, 1, 1250, 500, 2500, 1250, 8, 625, 5000, 2500, 2500, 1, 2500, 2500, 1000, 1250, 8, 625, 2500, 2500, 250, 1
Offset: 0

Views

Author

V. Raman, Dec 15 2012

Keywords

Comments

a(n) will always be a divisor of Phi(100000) = 40000.
This sequence is periodic with a period of 100000 because n^i mod 100000 = (n + 100000)^i mod 100000.
For the odd numbers n ending in {1, 3, 7, 9} which are coprime to 10, we can expect the powers of n mod 100000 to loop back to 1, with the value of n^a(n) mod 100000 = 1, but for the other numbers n that are not coprime to 10, they do not loop back to 1.
For the even numbers n ending in {2, 4, 6, 8}, n^a(n) mod 100000 = 9376.
For the numbers n ending in 5, n^(8*i) mod 100000 = 90625, for all i >= 1.
For the numbers n ending in 0, n^i mod 100000 = 0, for all i >= 5.

Examples

			a(2) = 2500 since 2^i mod 100000 = 2^(i + 2500) mod 100000, for all i >= 5.
a(3) = 5000 since 3^i mod 100000 = 3^(i + 5000) mod 100000, for all i >= 0.
But a(7) = 500 since 7^i mod 100000 = 7^(i + 500) mod 100000, for all i >= 0.
		

Crossrefs

Cf. A173635 (period with which the powers of n repeat mod 10).
Cf. A220022 (period with which the powers of n repeat mod 100).

Programs

  • Mathematica
    Flatten[Table[s = Table[PowerMod[n, e, 100000], {e, 2, 100000}]; Union[Differences[Position[s, s[[4]]]]], {n, 0, 40}]] (* Vincenzo Librandi, Jan 26 2013 *)
  • PARI
    k=100000; for(n=0, 100, x=(n^5)%k; y=(n^6)%k; z=1; while(x!=y, x=(x*n)%k; y=(y*n*n)%k; z++); print1(z", "))
Showing 1-5 of 5 results.