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.

A059667 Primes p such that x^49 = 2 has no solution mod p, but x^7 = 2 has a solution mod p.

This page as a plain text file.
%I A059667 #15 Sep 23 2013 03:09:28
%S A059667 4999,6959,7351,11467,15583,16073,20483,21169,21757,30773,35771,37339,
%T A059667 38711,41161,45179,46649,48119,51157,51647,57527,58997,64877,75167,
%U A059667 75853,80263,83791,84869,85751,86927,93983,95747,105253,110251,115837
%N A059667 Primes p such that x^49 = 2 has no solution mod p, but x^7 = 2 has a solution mod p.
%H A059667 Vincenzo Librandi, <a href="/A059667/b059667.txt">Table of n, a(n) for n = 1..76</a>
%t A059667 Select[Prime[Range[PrimePi[120000]]], ! MemberQ[PowerMod[Range[#], 49, #], Mod[2, #]] && MemberQ[PowerMod[Range[#], 7, #], Mod[2, #]] &] (* _Vincenzo Librandi_, Sep 21 2013 *)
%o A059667 (PARI) forprime(p=2,116000,x=0; while(x<p&&x^7%p!=2%p,x++); if(x<p,y=0; while(y<p&&y^(7^2)%p!=2%p,y++); if(y==p,print1(p,","))))
%o A059667 (PARI)
%o A059667 N=10^6;  default(primelimit,N);
%o A059667 ok(p, r, k1, k2)={
%o A059667     if (  Mod(r,p)^((p-1)/gcd(k1,p-1))!=1, return(0) );
%o A059667     if (  Mod(r,p)^((p-1)/gcd(k2,p-1))==1, return(0) );
%o A059667     return(1);
%o A059667 }
%o A059667 forprime(p=2,N, if (ok(p,2,7,7^2),print1(p,", ")));
%o A059667 \\ _Joerg Arndt_, Sep 21 2012
%Y A059667 Cf. A042966, A042967, A070179 - A070188.
%K A059667 nonn
%O A059667 1,1
%A A059667 _Klaus Brockhaus_, Feb 04 2001