%I #13 Jun 23 2024 11:26:31
%S 257,2113,2657,7489,10177,15073,18593,23041,25121,25409,25537,25793,
%T 27809,30881,30977,32321,37409,38273,41729,43649,51137,51361,54721,
%U 59809,63841,67073,67489,75553,77569,83009,86561,92641,94049,94433,95713,101281,102241
%N Primes such that x^16 = 2 has a solution in Z/pZ, but x^32 = 2 does not.
%e 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).
%o (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))
%o (Python)
%o from itertools import islice
%o from sympy import nextprime, is_nthpow_residue
%o def A373468_gen(startvalue=2): # generator of terms >= startvalue
%o p = max(1,startvalue-1)
%o while (p:=nextprime(p)):
%o if is_nthpow_residue(2,16,p) and not is_nthpow_residue(2,32,p):
%o yield p
%o A373468_list = list(islice(A373468_gen(),10)) # _Chai Wah Wu_, Jun 23 2024
%Y Cf. A059287 (similar for x^8 vs x^16).
%Y Subsequence of A070184 which is a subsequence of A252279.
%K nonn
%O 1,1
%A _M. F. Hasler_, Jun 22 2024
|