login
Primes p such that x^60 = 2 has a solution mod p.
2

%I #17 Sep 08 2022 08:44:58

%S 2,23,47,89,113,127,167,223,233,239,257,263,353,359,383,431,439,479,

%T 503,593,599,617,647,719,727,743,839,863,887,911,919,983,1049,1097,

%U 1103,1193,1217,1223,1289,1319,1327,1367,1399,1423,1433,1439,1487,1553

%N Primes p such that x^60 = 2 has a solution mod p.

%C Complement of A059645 relative to A000040. - _Vincenzo Librandi_, Sep 15 2012

%H R. J. Mathar, <a href="/A049592/b049592.txt">Table of n, a(n) for n = 1..1000</a>

%H <a href="/index/Pri#smp">Index entries for related sequences</a>

%t ok[p_]:= Reduce[Mod[x^60 - 2, p] == 0, x, Integers] =!= False; Select[Prime[Range[250]], ok] (* _Vincenzo Librandi_, Sep 15 2012 *)

%o (Magma) [p: p in PrimesUpTo(1600) | exists(t){x : x in ResidueClassRing(p) | x^60 eq 2}]; // _Vincenzo Librandi_, Sep 15 2012

%o (PARI)

%o N=10^4; default(primelimit,N);

%o ok(p, r, k)={ return ( (p==r) || (Mod(r,p)^((p-1)/gcd(k,p-1))==1) ); }

%o forprime(p=2,N, if (ok(p,2,60),print1(p,", ")));

%o /* _Joerg Arndt_, Sep 21 2012 */

%Y Cf. A000040, A059645.

%K nonn,easy

%O 1,1

%A _N. J. A. Sloane_