OFFSET
1,1
EXAMPLE
For p = 257, the equation x^16 = 2 has solutions 27, 41, 54, ... in Z/pZ, but x^32 can only be 0, +-1, +-4, +-16, +-64 (mod p).
PROG
(PARI) select( {is_A373468(p)=Mod(2, p)^(p\gcd(16, p-1))==1&&Mod(2, p)^(p\gcd(32, p-1))!=1}, primes(19999))
(Python)
from itertools import islice
from sympy import nextprime, is_nthpow_residue
def A373468_gen(startvalue=2): # generator of terms >= startvalue
p = max(1, startvalue-1)
while (p:=nextprime(p)):
if is_nthpow_residue(2, 16, p) and not is_nthpow_residue(2, 32, p):
yield p
CROSSREFS
KEYWORD
nonn
AUTHOR
M. F. Hasler, Jun 22 2024
STATUS
approved