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.

Previous Showing 11-20 of 22 results. Next

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

Original entry on oeis.org

0, 1, 2, 2, 1, 2, 3, 2, 6, 1, 0, 2, 12, 3, 2, 4, 16, 6, 3, 2, 6, 0, 22, 2, 5, 12, 18, 6, 28, 2, 30, 8, 0, 16, 3, 6, 6, 3, 12, 2, 40, 6, 7, 0, 6, 22, 46, 4, 21, 5, 16, 12, 26, 18, 0, 6, 6, 28, 58, 2, 4, 30, 6, 16, 12, 0, 66, 16, 22, 3, 70, 6, 72, 6, 10, 6, 0, 12, 39, 4
Offset: 1

Views

Author

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

Keywords

Crossrefs

Programs

  • Magma
    [0] cat [Modorder(11, n): n in [2..100]]; // Vincenzo Librandi, Apr 01 2014
  • Mathematica
    Table[SelectFirst[Range[EulerPhi[n]],PowerMod[11,#,n]==1&,0],{n,80}] (* Paul F. Marrero Romero, Oct 21 2024 *)

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

A215653 a(n) = smallest positive m such that m^2 = 1+k*n with positive k.

Original entry on oeis.org

2, 3, 2, 3, 4, 5, 6, 3, 8, 9, 10, 5, 12, 13, 4, 7, 16, 17, 18, 9, 8, 21, 22, 5, 24, 25, 26, 13, 28, 11, 30, 15, 10, 33, 6, 17, 36, 37, 14, 9, 40, 13, 42, 21, 19, 45, 46, 7, 48, 49, 16, 25, 52, 53, 21, 13, 20, 57, 58, 11, 60, 61, 8, 31, 14, 23, 66, 33, 22, 29
Offset: 1

Views

Author

Zak Seidov, Aug 19 2012

Keywords

Comments

Apparently a(n) = A070667(n) for n > 2. Note the linear patterns in the graph.

Examples

			a(1) = 2, k = 3; a(2) = 3, k = 4; a(3) = 2, k = 1; a(1000) = 249, k = 62.
		

Crossrefs

Programs

  • Mathematica
    Flatten[{2,Table[Select[Range[2,1000],PowerMod[#,2,k]==1&,1],{k,2,1000}]}] (* first 1000 terms *)
  • PARI
    a(n) = {my(m = n + 1); while(!issquare(m), m += n); sqrtint(m);} \\ Amiram Eldar, Mar 16 2025

Formula

a(n) = sqrt(1+n*A076942(n)).
a(n) = sqrt(A061369(n)). - Amiram Eldar, Mar 16 2025

A228179 Irregular table where the n-th row consists of the square roots of 1 in Z_n.

Original entry on oeis.org

1, 1, 2, 1, 3, 1, 4, 1, 5, 1, 6, 1, 3, 5, 7, 1, 8, 1, 9, 1, 10, 1, 5, 7, 11, 1, 12, 1, 13, 1, 4, 11, 14, 1, 7, 9, 15, 1, 16, 1, 17, 1, 18, 1, 9, 11, 19, 1, 8, 13, 20, 1, 21, 1, 22, 1, 5, 7, 11, 13, 17, 19, 23, 1, 24, 1, 25, 1, 26, 1, 13, 15, 27, 1, 28, 1, 11
Offset: 2

Views

Author

Tom Edgar, Aug 20 2013

Keywords

Comments

Each 1 starts a new row.
This is a subsequence of A020652.
Row n has A060594(n) entries.
Each row forms a subgroup of the multiplicative group of units of Z_n.

Examples

			The table starts out as follows:
  1
  1 2
  1 3
  1 4
  1 5
  1 6
  1 3 5 7
  1 8
  1 9
  1 10
  1 5 7 11
  ...
		

Crossrefs

Cf. A070667 (second column), A358016 (second-last column).
Cf. A277776 (nontrivial square roots of 1).

Programs

  • Maple
    T:= n-> seq(`if`(k&^2 mod n=1, k, NULL), k=1..n-1):
    seq(T(n), n=2..50);  # Alois P. Heinz, Aug 20 2013
  • Mathematica
    Flatten[Table[Position[Mod[Range[n]^2, n], 1], {n, 2, 50}]] (* T. D. Noe, Aug 20 2013 *)
  • Python
    from itertools import chain, count, islice
    from sympy.ntheory import sqrt_mod_iter
    def A228179_gen(): # generator of terms
        return chain.from_iterable((sorted(sqrt_mod_iter(1,n)) for n in count(2)))
    A228179_list = list(islice(A228179_gen(),30)) # Chai Wah Wu, Oct 26 2022
  • Sage
    [[i for i in [1..k-1] if (i*i).mod(k)==1] for k in [2..n]] #changing n gives you the table up to the n-th row.
    

A091733 a(n) is the least m > 1 such that m^3 = 1 (mod n).

Original entry on oeis.org

2, 3, 4, 5, 6, 7, 2, 9, 4, 11, 12, 13, 3, 9, 16, 17, 18, 7, 7, 21, 4, 23, 24, 25, 26, 3, 10, 9, 30, 31, 5, 33, 34, 35, 11, 13, 10, 7, 16, 41, 42, 25, 6, 45, 16, 47, 48, 49, 18, 51, 52, 9, 54, 19, 56, 9, 7, 59, 60, 61, 13, 5, 4, 65, 16, 67, 29, 69, 70, 11, 72, 25, 8, 47, 76, 45, 23, 55, 23
Offset: 1

Views

Author

David Wasserman, Mar 05 2004

Keywords

Comments

a(n) <= n + 1; the inequality is strict iff n is divisible by 9 or by a prime congruent to 1 mod 3. - Robert Israel, May 27 2014

Examples

			a(7) = 2 because 2^3 is congruent to 1 (mod 7).
		

Crossrefs

Programs

  • MATLAB
    m = 2; while mod(m^3 - 1, n); m = m + 1; end; m
    
  • Maple
    A:= n -> min(select(t -> type((t^3-1)/n, integer), [$2 .. n+1]));
    map(A, [$1 .. 1000]); # Robert Israel, May 27 2014
  • Mathematica
    f[n_] := Block[{x = 2}, While[Mod[x^3 - 1, n] != 0, x++]; x]; Array[f, 79] (* Robert G. Wilson v, Mar 29 2016 *)
  • PARI
    a(n) = my(k = 2); while(Mod(k, n)^3 != 1, k++); k; \\ Michel Marcus, Mar 30 2016

A070668 Smallest m in range 2..n-1 such that m^3 == 1 mod n, or 1 if no such number exists.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 2, 1, 4, 1, 1, 1, 3, 9, 1, 1, 1, 7, 7, 1, 4, 1, 1, 1, 1, 3, 10, 9, 1, 1, 5, 1, 1, 1, 11, 13, 10, 7, 16, 1, 1, 25, 6, 1, 16, 1, 1, 1, 18, 1, 1, 9, 1, 19, 1, 9, 7, 1, 1, 1, 13, 5, 4, 1, 16, 1, 29, 1, 1, 11, 1, 25, 8, 47, 1, 45, 23, 55, 23, 1, 28, 1, 1, 25
Offset: 1

Views

Author

N. J. A. Sloane, May 08 2002

Keywords

Crossrefs

Cf. A070667.

Programs

  • Maple
    a:= proc(n) local m;
          for m from 2 to n-1 do
            if m &^ 3 mod n = 1 then return m fi
          od; 1
        end:
    seq(a(n), n=1..100);  # Alois P. Heinz, Jun 29 2014
  • Mathematica
    a[n_] := (For[m = 2, m <= n-1, m++, If[PowerMod[m, 3, n] == 1, Return[m]]]; 1); Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Jul 20 2015 *)
  • PARI
    a(n) = {for (m=2, n-1, if (lift(Mod(m, n)^3) == 1, return (m));); return (1);} \\ Michel Marcus, Jun 29 2014

A070669 Smallest m in range 2..n-1 such that m^4 == 1 mod n, or 1 if no such number exists.

Original entry on oeis.org

1, 1, 2, 3, 2, 5, 6, 3, 8, 3, 10, 5, 5, 13, 2, 3, 4, 17, 18, 3, 8, 21, 22, 5, 7, 5, 26, 13, 12, 7, 30, 7, 10, 13, 6, 17, 6, 37, 5, 3, 9, 13, 42, 21, 8, 45, 46, 5, 48, 7, 4, 5, 23, 53, 12, 13, 20, 17, 58, 7, 11, 61, 8, 15, 8, 23, 66, 13, 22, 13, 70, 17, 27, 31, 7
Offset: 1

Views

Author

N. J. A. Sloane, May 08 2002

Keywords

Crossrefs

Cf. A070667.

Programs

  • Maple
    a:= proc(n) local m;
          for m from 2 to n-1 do
            if m &^ 4 mod n = 1 then return m fi
          od; 1
        end:
    seq(a(n), n=1..100);  # Alois P. Heinz, Jun 29 2014
  • Mathematica
    a[n_] := (For[m = 2, m <= n - 1, m++, If[PowerMod[m, 4, n] == 1, Return[m]]]; 1); Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Jul 20 2015 *)
  • PARI
    a(n) = {for (m=2, n-1, if (lift(Mod(m, n)^4) == 1, return (m));); return (1);} \\ Michel Marcus, Jun 29 2014

A070670 Smallest m in range 2..n-1 such that m^5 == 1 mod n, or 1 if no such number exists.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 6, 1, 1, 1, 1, 1, 2, 1, 4, 1, 1, 1, 1, 1, 1, 1, 10, 1, 1, 5, 1, 1, 1, 1, 1, 11, 1, 1, 1, 1, 16, 1, 1, 1, 1, 1, 9, 33, 1, 1, 1, 25, 1, 1, 1, 1, 5, 1, 1, 1, 16, 1, 15, 1, 1, 1, 1, 37, 1, 1, 1, 1, 1, 9, 1, 1
Offset: 1

Views

Author

N. J. A. Sloane, May 08 2002

Keywords

Crossrefs

Cf. A070667.

Programs

  • Maple
    a:= proc(n) local m;
          for m from 2 to n-1 do
            if m &^ 5 mod n = 1 then return m fi
          od; 1
        end:
    seq(a(n), n=1..100);  # Alois P. Heinz, Jun 29 2014
  • Mathematica
    a[n_] := (For[m = 2, m <= n - 1, m++, If[PowerMod[m, 5, n] == 1, Return[m]]]; 1); Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Jul 20 2015 *)
  • PARI
    a(n) = {for (m=2, n-1, if (lift(Mod(m, n)^5) == 1, return (m));); return (1);} \\ Michel Marcus, Jun 29 2014

A070671 Smallest m in range 2..n-1 such that m^6 == 1 mod n, or 1 if no such number exists.

Original entry on oeis.org

1, 1, 2, 3, 4, 5, 2, 3, 2, 9, 10, 5, 3, 3, 4, 7, 16, 5, 7, 9, 2, 21, 22, 5, 24, 3, 8, 3, 28, 11, 5, 15, 10, 33, 4, 5, 10, 7, 4, 9, 40, 5, 6, 21, 4, 45, 46, 7, 18, 49, 16, 3, 52, 17, 21, 3, 7, 57, 58, 11, 13, 5, 2, 31, 4, 23, 29, 33, 22, 9, 70, 5, 8, 11, 26, 7, 10, 17
Offset: 1

Views

Author

N. J. A. Sloane, May 08 2002

Keywords

Crossrefs

Cf. A070667.

Programs

  • Maple
    a:= proc(n) local m;
          for m from 2 to n-1 do
            if m &^ 6 mod n = 1 then return m fi
          od; 1
        end:
    seq(a(n), n=1..100);  # Alois P. Heinz, Jun 29 2014
  • Mathematica
    a[n_] := Module[{m}, For[m = 2, m <= n-1, m++, If[PowerMod[m, 6, n] == 1, Return[m]]]; 1];
    Array[a, 100] (* Jean-François Alcover, Nov 17 2020 *)
  • PARI
    a(n) = {for (m=2, n-1, if (lift(Mod(m, n)^6) == 1, return (m));); return (1);} \\ Michel Marcus, Jun 29 2014

A070672 Smallest m in range 2..n-1 such that m^7 == 1 mod n, or 1 if no such number exists.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 8, 1, 1, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 20, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 7, 1, 1, 1, 1, 1
Offset: 1

Views

Author

N. J. A. Sloane, May 08 2002

Keywords

Crossrefs

Cf. A070667.

Programs

  • Maple
    a:= proc(n) local m;
          for m from 2 to n-1 do
            if m &^ 7 mod n = 1 then return m fi
          od; 1
        end:
    seq(a(n), n=1..100);  # Alois P. Heinz, Jun 29 2014
  • Mathematica
    a[n_] := Module[{m}, For[m = 2, m <= n-1, m++, If[PowerMod[m, 7, n] == 1, Return[m]]]; 1];
    Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Nov 20 2024 *)
  • PARI
    a(n) = {for (m=2, n-1, if (lift(Mod(m, n)^7) == 1, return (m));); return (1);} \\ Michel Marcus, Jun 29 2014
Previous Showing 11-20 of 22 results. Next