login
Primes for which -32 is a primitive root.
1

%I #18 Mar 31 2024 15:13:17

%S 5,7,13,23,29,37,47,53,79,103,149,167,173,197,199,239,263,269,293,317,

%T 349,359,367,373,383,389,463,479,487,503,509,557,599,607,613,647,653,

%U 677,709,719,743,757,773,797,823,829,839,853,863,877,887,967,983,1039,1063,1087

%N Primes for which -32 is a primitive root.

%H Vincenzo Librandi, <a href="/A105904/b105904.txt">Table of n, a(n) for n = 1..1000</a>

%H <a href="/index/Pri#primes_root">Index entries for primes by primitive root</a>

%p select(t -> isprime(t) and numtheory:-order(-32,t) = t-1, [seq(2*k+1,k=1..1000)]); # _Robert Israel_, Apr 28 2015

%t pr=-32; Select[Prime[Range[200]], MultiplicativeOrder[pr, # ] == #-1 &] (* OR *)

%t a[p_, q_]:=Sum[2 Cos[2^n Pi/((2 q+1)(2 p+1))],{n,1,2 q p}]

%t 2 Select[Range[800], Rationalize[N[a[#, 5], 20]] == 1 &] + 1 (* _Gerry Martens_, Apr 28 2015 *)

%o (PARI) is(p)=isprime(p)&&p>2&&znorder(Mod(-32,p))==p-1 \\ _M. F. Hasler_, May 04 2015

%K nonn

%O 1,1

%A _N. J. A. Sloane_, Apr 24 2005