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-9 of 9 results.

A053447 Multiplicative order of 4 mod 2n+1.

Original entry on oeis.org

1, 1, 2, 3, 3, 5, 6, 2, 4, 9, 3, 11, 10, 9, 14, 5, 5, 6, 18, 6, 10, 7, 6, 23, 21, 4, 26, 10, 9, 29, 30, 3, 6, 33, 11, 35, 9, 10, 15, 39, 27, 41, 4, 14, 11, 6, 5, 18, 24, 15, 50, 51, 6, 53, 18, 18, 14, 22, 6, 12, 55, 10, 50, 7, 7, 65, 9, 18, 34, 69, 23, 30, 14, 21, 74, 15, 12, 10, 26
Offset: 0

Views

Author

Keywords

Comments

For a set S = {x, y} (x < y), let f(S) = {2x, y - x}, then a(n) is the smallest k > 0 such that f_k({1, 2n}) = {1, 2n} where f_k(S) denotes iteration for k times. E.g., for n = 3 we have: f_1({1, 6}) = f({1, 6}) = {2, 5}, f_2({1, 6}) = f({2, 5}) = {3, 4}, f_3({1, 6}) = f({3, 4}) = {1, 6}. - Jianing Song, Jan 27 2019
From Jianing Song, Dec 24 2022: (Start)
Let psi = A002322. For n > 0, we have 4^(psi(2*n+1)/2) = 2^psi(2*n+1) == 1 (mod 2*n+1), so a(n) divides psi(2*n+1)/2 => a(n) <= psi(2*n+1)/2 <= n. a(n) = psi(2*n+1)/2 if and only if one of the two following conditions holds: (a) the multiplicative order of 2 modulo 2*n+1 is psi(2*n+1); (b) the multiplicative order of 2 modulo 2*n+1 is psi(2*n+1)/2, and psi(2*n+1) == 2 (mod 4).
Additionally, a(n) = n if and only if 2*n+1 = p is a prime, and one of the two following conditions holds: (a) 2 is a primitive root modulo p; (b) p == 3 (mod 4), and the multiplicative order of 2 modulo p is (p-1)/2 (in this case, we have p == 7 (mod 8) since 2 is a quadratic residue modulo p). Such primes p are listed in A216371. (End)

Crossrefs

Programs

  • GAP
    List([0..80],n->OrderMod(4,2*n+1)); # Muniru A Asiru, Feb 25 2019
  • Magma
    [1] cat [Modorder(4, 2*n+1): n in [1..100]]; // Vincenzo Librandi, Apr 01 2014
    
  • Mathematica
    Table[ MultiplicativeOrder[4, n], {n, 1, 160, 2}] (* Robert G. Wilson v, Apr 05 2011 *)
  • PARI
    a(n) = znorder(Mod(4, 2*n+1)); \\ Michel Marcus, Feb 05 2015
    

Formula

Let b = A002326, then a(n) = b(n) if b(n) is odd, otherwise a(n) = b(n)/2. - Joerg Arndt, Feb 03 2019

A053451 Multiplicative order of 8 mod 2n+1.

Original entry on oeis.org

1, 2, 4, 1, 2, 10, 4, 4, 8, 6, 2, 11, 20, 6, 28, 5, 10, 4, 12, 4, 20, 14, 4, 23, 7, 8, 52, 20, 6, 58, 20, 2, 4, 22, 22, 35, 3, 20, 10, 13, 18, 82, 8, 28, 11, 4, 10, 12, 16, 10, 100, 17, 4, 106, 12, 12, 28, 44, 4, 8, 110, 20, 100, 7, 14, 130, 6, 12, 68, 46, 46, 20, 28, 14, 148, 5
Offset: 0

Views

Author

Keywords

Comments

In the case n=2 and any other case where a(n)=A000010(2n+1), the multiplicative group of units modulo 2n+1 is cyclic and thus 8 (and any other unit) is a generator. These moduli are A167796, so this occurs whenever 2n+1 (caution: not n) is a member of A167796. - Kellen Myers, Feb 06 2015

Examples

			The third term a(2) is 4 because 4 is the smallest integer such that 8^4 is congruent to 1 modulo 2*2+1=5. The orbit of 8 modulo 5 is {3, 4, 2, 1}. - _Kellen Myers_, Feb 06 2015
		

Crossrefs

Programs

  • GAP
    List([0..80],n->OrderMod(8,2*n+1)); # Muniru A Asiru, Feb 26 2019
  • Magma
    [1] cat [Modorder(8, 2*n+1): n in [1..100]]; // Vincenzo Librandi, Apr 01 2014
    
  • Mathematica
    Table[MultiplicativeOrder[8, n], {n, 1, 150, 2}] (* Robert G. Wilson v, Apr 05 2011 *)
  • PARI
    vector(80, n, n--; znorder(Mod(8, 2*n+1))) \\ Michel Marcus, Feb 05 2015
    

A070677 Smallest m in range 1..phi(n) such that 5^m == 1 mod n, or 0 if no such number exists.

Original entry on oeis.org

0, 1, 2, 1, 0, 2, 6, 2, 6, 0, 5, 2, 4, 6, 0, 4, 16, 6, 9, 0, 6, 5, 22, 2, 0, 4, 18, 6, 14, 0, 3, 8, 10, 16, 0, 6, 36, 9, 4, 0, 20, 6, 42, 5, 0, 22, 46, 4, 42, 0, 16, 4, 52, 18, 0, 6, 18, 14, 29, 0, 30, 3, 6, 16, 0, 10, 22, 16, 22, 0, 5, 6, 72, 36, 0, 9, 30, 4, 39, 0
Offset: 1

Views

Author

N. J. A. Sloane and Amarnath Murthy, May 08 2002

Keywords

Crossrefs

Programs

  • Magma
    [0] cat [Modorder(5, n): n in [2..100]]; // Vincenzo Librandi, Apr 01 2014
    
  • Mathematica
    Table[SelectFirst[Range[EulerPhi[n]], PowerMod[5, #, n] == 1 &, 0],{n, 80}] (* Paul F. Marrero Romero, Oct 04 2024 *)
  • Python
    from sympy import n_order
    def A070677(n): return n_order(5,n) if n%5 and n>1 else 0 # Chai Wah Wu, Feb 23 2023

A070682 Smallest m in range 1..phi(2n+1) such that 10^m == 1 mod 2n+1, or 0 if no such number exists.

Original entry on oeis.org

0, 1, 0, 6, 1, 2, 6, 0, 16, 18, 6, 22, 0, 3, 28, 15, 2, 0, 3, 6, 5, 21, 0, 46, 42, 16, 13, 0, 18, 58, 60, 6, 0, 33, 22, 35, 8, 0, 6, 13, 9, 41, 0, 28, 44, 6, 15, 0, 96, 2, 4, 34, 0, 53, 108, 3, 112, 0, 6, 48, 22, 5, 0, 42, 21, 130, 18, 0, 8, 46, 46, 6, 0, 42, 148
Offset: 0

Views

Author

N. J. A. Sloane and Amarnath Murthy, May 08 2002

Keywords

Crossrefs

Programs

  • PARI
    a(n) = {for (m = 1, eulerphi(2*n+1), if (10^m % (2*n+1) == 1, return (m));); return (0);} \\ Michel Marcus, Sep 14 2013

A070683 Smallest m in range 1..phi(2n+1) such that 12^m == 1 mod 2n+1, or 0 if no such number exists.

Original entry on oeis.org

0, 0, 4, 6, 0, 1, 2, 0, 16, 6, 0, 11, 20, 0, 4, 30, 0, 12, 9, 0, 40, 42, 0, 23, 42, 0, 52, 4, 0, 29, 15, 0, 4, 66, 0, 35, 36, 0, 6, 26, 0, 41, 16, 0, 8, 6, 0, 12, 16, 0, 100, 102, 0, 53, 54, 0, 112, 44, 0, 48, 11, 0, 100, 126, 0, 65, 6, 0, 136, 138, 0, 2, 4, 0, 148
Offset: 0

Views

Author

N. J. A. Sloane and Amarnath Murthy, May 08 2002

Keywords

Comments

a(n)=2*n if 2*n+1 is in A019340, otherwise a(n)<2*n. - Robert Israel, Apr 17 2019

Crossrefs

Programs

  • Maple
    f:= proc(n)
      if n mod 3 = 1 then 0 else numtheory:-order(12,2*n+1) fi
    end proc:
    0, seq(f(n),n=1..100); # Robert Israel, Apr 16 2019
  • Mathematica
    a[n_] := Module[{s}, s = SelectFirst[Range[EulerPhi[2n+1]], PowerMod[12, #, 2n+1] == 1&]; If[s === Missing["NotFound"], 0, s]];
    a /@ Range[0, 100] (* Jean-François Alcover, Jun 04 2020 *)

A070678 Smallest m in range 1..phi(n) such that 7^m == 1 mod n, or 0 if no such number exists.

Original entry on oeis.org

0, 1, 1, 2, 4, 1, 0, 2, 3, 4, 10, 2, 12, 0, 4, 2, 16, 3, 3, 4, 0, 10, 22, 2, 4, 12, 9, 0, 7, 4, 15, 4, 10, 16, 0, 6, 9, 3, 12, 4, 40, 0, 6, 10, 12, 22, 23, 2, 0, 4, 16, 12, 26, 9, 20, 0, 3, 7, 29, 4, 60, 15, 0, 8, 12, 10, 66, 16, 22, 0, 70, 6, 24, 9, 4, 6, 0, 12
Offset: 1

Views

Author

N. J. A. Sloane and Amarnath Murthy, May 08 2002

Keywords

Crossrefs

Programs

  • Magma
    [0] cat [Modorder(7, n): n in [2..100]]; // Vincenzo Librandi, Apr 01 2014
  • Mathematica
    Table[SelectFirst[Range[EulerPhi[n]],PowerMod[7,#,n]==1&],{n,80}]/.(Missing["NotFound"]->0) (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jan 25 2019 *)

A070679 Smallest m in range 1..phi(n) such that 9^m == 1 mod n, or 0 if no such number exists.

Original entry on oeis.org

0, 1, 0, 1, 2, 0, 3, 1, 0, 2, 5, 0, 3, 3, 0, 2, 8, 0, 9, 2, 0, 5, 11, 0, 10, 3, 0, 3, 14, 0, 15, 4, 0, 8, 6, 0, 9, 9, 0, 2, 4, 0, 21, 5, 0, 11, 23, 0, 21, 10, 0, 3, 26, 0, 10, 3, 0, 14, 29, 0, 5, 15, 0, 8, 6, 0, 11, 8, 0, 6, 35, 0, 6, 9, 0, 9, 15, 0, 39, 2, 0, 4, 41, 0
Offset: 1

Views

Author

N. J. A. Sloane and Amarnath Murthy, May 08 2002

Keywords

Crossrefs

Programs

  • Magma
    [0] cat [Modorder(9, n): n in [2..100]]; // Vincenzo Librandi, Apr 01 2014
  • Mathematica
    Table[SelectFirst[Range[EulerPhi[n]],PowerMod[9,#,n]==1&],{n,90}]/. Missing[ "NotFound"] -> 0 (* Harvey P. Dale, Jan 22 2023 *)
  • PARI
    a(n) = {for (i = 1, eulerphi(n), if ((9^i % n) == 1, return(i));); return (0);} \\Michel Marcus, Jul 31 2013
    

A070676 Smallest m in range 1..phi(n) such that 3^m == 1 mod n, or 0 if no such number exists.

Original entry on oeis.org

0, 1, 0, 2, 4, 0, 6, 2, 0, 4, 5, 0, 3, 6, 0, 4, 16, 0, 18, 4, 0, 5, 11, 0, 20, 3, 0, 6, 28, 0, 30, 8, 0, 16, 12, 0, 18, 18, 0, 4, 8, 0, 42, 10, 0, 11, 23, 0, 42, 20, 0, 6, 52, 0, 20, 6, 0, 28, 29, 0, 10, 30, 0, 16, 12, 0, 22, 16, 0, 12, 35, 0, 12, 18, 0, 18, 30, 0
Offset: 1

Views

Author

N. J. A. Sloane and Amarnath Murthy, May 08 2002

Keywords

Crossrefs

Programs

  • Magma
    [0] cat [Modorder(3, n): n in [2..100]]; // Vincenzo Librandi, Apr 01 2014
  • Mathematica
    Table[SelectFirst[Range[EulerPhi[n]],PowerMod[3,# ,n]==1&,0],{n,80}] (* The program uses the SelectFirst function from Mathematica version 10 *) (* Harvey P. Dale, Aug 18 2015 *)

A070681 Smallest m in range 1..phi(2n+1) such that 6^m == 1 mod 2n+1, or 0 if no such number exists.

Original entry on oeis.org

0, 0, 1, 2, 0, 10, 12, 0, 16, 9, 0, 11, 5, 0, 14, 6, 0, 2, 4, 0, 40, 3, 0, 23, 14, 0, 26, 10, 0, 58, 60, 0, 12, 33, 0, 35, 36, 0, 10, 78, 0, 82, 16, 0, 88, 12, 0, 9, 12, 0, 10, 102, 0, 106, 108, 0, 112, 11, 0, 16, 110, 0, 25, 126, 0, 130, 18, 0, 136, 23, 0, 60
Offset: 0

Views

Author

N. J. A. Sloane and Amarnath Murthy, May 08 2002

Keywords

Crossrefs

Showing 1-9 of 9 results.