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.

A231370 Squarefree composite numbers k such that 2 is a primitive root for all prime factors of k.

This page as a plain text file.
%I A231370 #23 Feb 16 2025 08:33:20
%S A231370 15,33,39,55,57,65,87,95,111,143,145,159,165,177,183,185,195,201,209,
%T A231370 247,249,265,285,295,303,305,319,321,335,377,393,407,415,417,429,435,
%U A231370 447,481,489,505,519,535,537,543,551,555,583,591,627,633,649,655,671,681
%N A231370 Squarefree composite numbers k such that 2 is a primitive root for all prime factors of k.
%C A231370 If k is the smallest integer satisfying 10^k == 1 (mod p), we say that 10 has order k (mod p). If n is the product of distinct primes p_i, the period of 1/n in base b is the least common multiple of the orders of b (mod p_i), provided b and n are relatively prime.
%H A231370 Amiram Eldar, <a href="/A231370/b231370.txt">Table of n, a(n) for n = 1..10000</a>
%H A231370 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PrimitiveRoot.html">Primitive Root</a>.
%H A231370 Wikipedia, <a href="http://en.wikipedia.org/wiki/Binary_number">Binary number</a>.
%t A231370 q[n_] := CompositeQ[n] && SquareFreeQ[n] && AllTrue[FactorInteger[n][[;;,1]],  MultiplicativeOrder[2, #] == # - 1 &]; Select[Range[700], q] (* _Amiram Eldar_, Oct 03 2021 *)
%o A231370 (PARI) isok(k) = if ((k>1) && (k%2) && !isprime(k) && issquarefree(k), my(f=factor(k)[,1]~); for (j=1, #f, if (znorder(Mod(2, f[j])) != (f[j]-1), return(0))); return (1)); return (0); \\ _Michel Marcus_, Oct 03 2021
%Y A231370 Subsequence of A024556.
%Y A231370 Cf. A001122, A231371, A231372.
%K A231370 nonn
%O A231370 1,1
%A A231370 _Arkadiusz Wesolowski_, Nov 08 2013