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.

A346316 Composite numbers with primitive root 6.

This page as a plain text file.
%I A346316 #39 Sep 15 2021 07:33:52
%S A346316 121,169,289,1331,1681,2197,3481,3721,4913,6241,6889,7921,10609,11449,
%T A346316 11881,12769,14641,16129,17161,18769,22801,24649,28561,32041,39601,
%U A346316 49729,51529,52441,54289,63001,66049,68921,73441,76729,83521,120409,134689,139129,157609
%N A346316 Composite numbers with primitive root 6.
%C A346316 An alternative description: Numbers k such that 1/k in base 6 generates a repeating fraction with period phi(n) and n/2 < phi(n) < n-1.
%C A346316 For example, in base 6, 1/121 has repeat length 110 = phi(121) which is > 121/2 but less than 121-1.
%H A346316 Robert Hutchins, <a href="/A346316/a346316.c.txt">PrimRoot.c</a>
%F A346316 A167794 INTERSECT A002808.
%p A346316 isA033948 := proc(n)
%p A346316     if n in {1,2,4} then
%p A346316         true;
%p A346316     elif type(n,'odd') and nops(numtheory[factorset](n)) = 1 then
%p A346316         true;
%p A346316     elif type(n,'even') and type(n/2,'odd') and nops(numtheory[factorset](n/2)) = 1 then
%p A346316         true;
%p A346316     else
%p A346316         false;
%p A346316     end if;
%p A346316 end proc:
%p A346316 isA167794 := proc(n)
%p A346316     if not isA033948(n) or n = 1 then
%p A346316         false;
%p A346316     elif numtheory[order](6,n) = numtheory[phi](n) then
%p A346316         true;
%p A346316     else
%p A346316         false;
%p A346316     end if;
%p A346316 end proc:
%p A346316 A346316 := proc(n)
%p A346316     option remember;
%p A346316     local a;
%p A346316     if n = 1 then
%p A346316         121;
%p A346316     else
%p A346316         for a from procname(n-1)+1 do
%p A346316             if not isprime(a) and isA167794(a) then
%p A346316                 return a;
%p A346316             end if;
%p A346316         end do:
%p A346316     end if;
%p A346316 end proc:
%p A346316 seq(A346316(n),n=1..20) ; # _R. J. Mathar_, Sep 15 2021
%t A346316 Select[Range[160000], CompositeQ[#] && PrimitiveRoot[#, 6] == 6 &] (* _Amiram Eldar_, Jul 13 2021 *)
%o A346316 (PARI) isok(m) = (m>1) && !isprime(m) && (gcd(m, 6)==1) && (znorder(Mod(6, m))==eulerphi(m)); \\ _Michel Marcus_, Aug 12 2021
%Y A346316 Subsequence of A244623.
%Y A346316 Subsequence of A167794.
%Y A346316 Cf. A108989 (for base 2),  A158248 (for base 10).
%Y A346316 Cf. A157502.
%K A346316 nonn
%O A346316 1,1
%A A346316 _Robert Hutchins_, Jul 13 2021