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.

A382224 Numbers k such that every element with maximal order mod k is prime.

Original entry on oeis.org

3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 16, 18, 20, 22, 24, 28, 30, 36, 42, 54, 60, 78
Offset: 1

Views

Author

Miles Englezou, Mar 19 2025

Keywords

Comments

A generalization of A382220 to include k such that Z/kZ is noncyclic.
There are no more terms up to k = 10^7.
Is this sequence finite? For similar reasons to those stated in A382220, it becomes increasingly less likely that the set of all maximal order elements mod k will contain only primes as k increases.

Examples

			Elements with maximal order mod a(n) for 1 <= n <= 22:
  3  [2]
  4  [3]
  5  [2, 3]
  6  [5]
  7  [3, 5]
  8  [3, 5, 7]
  9  [2, 5]
 10  [3, 7]
 12  [5, 7, 11]
 14  [3, 5]
 16  [3, 5, 11, 13]
 18  [5, 11]
 20  [3, 7, 13, 17]
 22  [7, 13, 17, 19]
 24  [5, 7, 11, 13, 17, 19, 23]
 28  [3, 5, 11, 17, 19, 23]
 30  [7, 13, 17, 23]
 36  [5, 7, 11, 23, 29, 31]
 42  [5, 11, 17, 19, 23, 31]
 54  [5, 11, 23, 29, 41, 47]
 60  [7, 13, 17, 23, 37, 43, 47, 53]
 78  [7, 11, 19, 37, 41, 59, 67, 71]
		

Crossrefs

Cf. A002322, A382220 (a subsequence).

Programs

  • Mathematica
    Select[Range[2,100],And@@PrimeQ@Select[Range[(n=#)-1],MultiplicativeOrder[#,n]==CarmichaelLambda[n]&]&] (* Giorgos Kalogeropoulos, Mar 23 2025 *)
  • PARI
    isok(n) = my(m=lcm(apply(f->(f[1]-1)*f[1]^(f[2]-1-(f[1]==2&&f[2]>2)), Vec(factor(n)~)))); for(k=1, n-1, if(gcd(k,n)==1 && znorder(Mod(k,n))==m && isprime(k)==0, return(0)); if(k==n-1, return(1)))