A364867 Primes p such that the multiplicative order of 9 modulo p is (p-1)/2.
5, 7, 11, 17, 19, 23, 29, 31, 43, 47, 53, 59, 71, 79, 83, 89, 101, 107, 113, 127, 131, 137, 139, 149, 163, 167, 173, 179, 191, 197, 199, 211, 223, 227, 233, 239, 251, 257, 263, 269, 281, 283, 293, 311, 317, 331, 347, 353, 359, 379, 383, 389, 401, 419, 443, 449, 461, 463, 467, 479, 487
Offset: 1
Examples
7 is a term since the multiplicative order of 9 modulo 7 is 3 = (7-1)/2.
Links
- Jianing Song, Table of n, a(n) for n = 1..10000
Crossrefs
Programs
-
Mathematica
okQ[p_] := MultiplicativeOrder[9, p] == (p - 1)/2; Select[Prime[Range[100]], okQ] (* Jean-François Alcover, Nov 24 2024 *)
-
PARI
isA364867(p) = isprime(p) && (p!=3) && znorder(Mod(9, p)) == (p-1)/2
-
Python
from sympy import n_order, nextprime from itertools import islice def A364867_gen(startvalue=4): # generator of terms >= startvalue p = max(startvalue-1,3) while (p:=nextprime(p)): if n_order(9,p) == p-1>>1: yield p A364867_list = list(islice(A364867_gen(),20)) # Chai Wah Wu, Aug 11 2023
Comments