cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A049595 Primes p such that x^63 = 2 has a solution mod p.

This page as a plain text file.
%I A049595 #26 May 06 2024 14:25:08
%S A049595 2,3,5,11,17,23,31,41,47,53,59,83,89,101,107,131,137,149,157,167,173,
%T A049595 179,191,223,227,229,233,251,257,263,269,277,283,293,311,317,347,353,
%U A049595 359,383,389,397,401,419,431,439,443,457,461,467,479,499,503,509,521
%N A049595 Primes p such that x^63 = 2 has a solution mod p.
%C A049595 Complement of A059647 relative to A000040. - _Vincenzo Librandi_, Sep 15 2012
%H A049595 R. J. Mathar, <a href="/A049595/b049595.txt">Table of n, a(n) for n = 1..1000</a>
%H A049595 <a href="/index/Pri#smp">Index entries for related sequences</a>
%p A049595 select(p -> isprime(p) and nops([msolve(x^63-2,p)])>0, [2,seq(2*i+1,i=1..1000)]); # _Robert Israel_, Nov 03 2014
%t A049595 ok[p_]:= Reduce[Mod[x^63 - 2, p] == 0, x, Integers] =!= False; Select[Prime[Range[150]], ok] (* _Vincenzo Librandi_, Sep 15 2012 *)
%o A049595 (Magma) [p: p in PrimesUpTo(600) | exists(t){x : x in ResidueClassRing(p) | x^63 eq 2}]; // _Vincenzo Librandi_, Sep 15 2012
%o A049595 (PARI) N=10^4;
%o A049595 ok(p, r, k)={ return ( (p==r) || (Mod(r,p)^((p-1)/gcd(k,p-1))==1) ); }
%o A049595 forprime(p=2,N, if (ok(p,2,63),print1(p,", ")));
%o A049595 /* _Joerg Arndt_, Sep 21 2012 */
%o A049595 (Python)
%o A049595 from itertools import islice
%o A049595 from sympy import nextprime, is_nthpow_residue
%o A049595 def A049595_gen(startvalue=2): # generator of terms >= startvalue
%o A049595     p = max(startvalue-1,1)
%o A049595     while (p:=nextprime(p)):
%o A049595         if is_nthpow_residue(2,63,p):
%o A049595             yield p
%o A049595 A049595_list = list(islice(A049595_gen(),20)) # _Chai Wah Wu_, May 06 2024
%Y A049595 Cf. A000040, A059647.
%K A049595 nonn,easy
%O A049595 1,1
%A A049595 _N. J. A. Sloane_