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.

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

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