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 21-22 of 22 results.

A070673 Smallest m in range 2..n-1 such that m^8 == 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, 2, 17, 18, 3, 8, 21, 22, 5, 7, 5, 26, 13, 12, 7, 30, 3, 10, 9, 6, 17, 6, 37, 5, 3, 3, 13, 42, 21, 8, 45, 46, 5, 48, 7, 2, 5, 23, 53, 12, 13, 20, 17, 58, 7, 11, 61, 8, 7, 8, 23, 66, 9, 22, 13, 70, 17, 10, 31, 7, 37
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 &^ 8 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, 8, n] == 1, Return[m]]]; 1];
    Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Mar 06 2024 *)
  • PARI
    a(n) = {for (m=2, n-1, if (lift(Mod(m, n)^8) == 1, return (m));); return (1);} \\ Michel Marcus, Jun 29 2014

A070674 Smallest m in range 2..n-1 such that m^9 == 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, 4, 1, 4, 1, 1, 1, 1, 3, 4, 9, 1, 1, 5, 1, 1, 1, 11, 13, 7, 5, 16, 1, 1, 25, 6, 1, 16, 1, 1, 1, 18, 1, 1, 9, 1, 7, 1, 9, 4, 1, 1, 1, 13, 5, 4, 1, 16, 1, 29, 1, 1, 11, 1, 25, 2, 7, 1, 5, 23, 55, 23, 1, 10, 1, 1, 25, 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 &^ 9 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, 9, n] == 1, Return[m]]]; 1];
    Array[a, 100] (* Jean-François Alcover, Nov 18 2020 *)
  • PARI
    a(n) = {for (m=2, n-1, if (lift(Mod(m, n)^9) == 1, return (m));); return (1);} \\ Michel Marcus, Jun 29 2014
Previous Showing 21-22 of 22 results.