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.
%I A382224 #28 Mar 23 2025 17:05:14 %S A382224 3,4,5,6,7,8,9,10,12,14,16,18,20,22,24,28,30,36,42,54,60,78 %N A382224 Numbers k such that every element with maximal order mod k is prime. %C A382224 A generalization of A382220 to include k such that Z/kZ is noncyclic. %C A382224 There are no more terms up to k = 10^7. %C A382224 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. %e A382224 Elements with maximal order mod a(n) for 1 <= n <= 22: %e A382224 3 [2] %e A382224 4 [3] %e A382224 5 [2, 3] %e A382224 6 [5] %e A382224 7 [3, 5] %e A382224 8 [3, 5, 7] %e A382224 9 [2, 5] %e A382224 10 [3, 7] %e A382224 12 [5, 7, 11] %e A382224 14 [3, 5] %e A382224 16 [3, 5, 11, 13] %e A382224 18 [5, 11] %e A382224 20 [3, 7, 13, 17] %e A382224 22 [7, 13, 17, 19] %e A382224 24 [5, 7, 11, 13, 17, 19, 23] %e A382224 28 [3, 5, 11, 17, 19, 23] %e A382224 30 [7, 13, 17, 23] %e A382224 36 [5, 7, 11, 23, 29, 31] %e A382224 42 [5, 11, 17, 19, 23, 31] %e A382224 54 [5, 11, 23, 29, 41, 47] %e A382224 60 [7, 13, 17, 23, 37, 43, 47, 53] %e A382224 78 [7, 11, 19, 37, 41, 59, 67, 71] %t A382224 Select[Range[2,100],And@@PrimeQ@Select[Range[(n=#)-1],MultiplicativeOrder[#,n]==CarmichaelLambda[n]&]&] (* _Giorgos Kalogeropoulos_, Mar 23 2025 *) %o A382224 (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))) %Y A382224 Cf. A002322, A382220 (a subsequence). %K A382224 nonn,more %O A382224 1,1 %A A382224 _Miles Englezou_, Mar 19 2025