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.

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

This page as a plain text file.
%I A070671 #12 Nov 17 2020 11:08:00
%S A070671 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,
%T A070671 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,
%U A070671 58,11,13,5,2,31,4,23,29,33,22,9,70,5,8,11,26,7,10,17
%N A070671 Smallest m in range 2..n-1 such that m^6 == 1 mod n, or 1 if no such number exists.
%H A070671 Alois P. Heinz, <a href="/A070671/b070671.txt">Table of n, a(n) for n = 1..10000</a>
%p A070671 a:= proc(n) local m;
%p A070671       for m from 2 to n-1 do
%p A070671         if m &^ 6 mod n = 1 then return m fi
%p A070671       od; 1
%p A070671     end:
%p A070671 seq(a(n), n=1..100);  # _Alois P. Heinz_, Jun 29 2014
%t A070671 a[n_] := Module[{m}, For[m = 2, m <= n-1, m++, If[PowerMod[m, 6, n] == 1, Return[m]]]; 1];
%t A070671 Array[a, 100] (* _Jean-François Alcover_, Nov 17 2020 *)
%o A070671 (PARI) a(n) = {for (m=2, n-1, if (lift(Mod(m, n)^6) == 1, return (m));); return (1);} \\ _Michel Marcus_, Jun 29 2014
%Y A070671 Cf. A070667.
%K A070671 nonn
%O A070671 1,3
%A A070671 _N. J. A. Sloane_, May 08 2002