OFFSET
1,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..76
MATHEMATICA
Select[Prime[Range[PrimePi[120000]]], ! MemberQ[PowerMod[Range[#], 49, #], Mod[2, #]] && MemberQ[PowerMod[Range[#], 7, #], Mod[2, #]] &] (* Vincenzo Librandi, Sep 21 2013 *)
PROG
(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, ", "))))
(PARI)
N=10^6; default(primelimit, N);
ok(p, r, k1, k2)={
if ( Mod(r, p)^((p-1)/gcd(k1, p-1))!=1, return(0) );
if ( Mod(r, p)^((p-1)/gcd(k2, p-1))==1, return(0) );
return(1);
}
forprime(p=2, N, if (ok(p, 2, 7, 7^2), print1(p, ", ")));
\\ Joerg Arndt, Sep 21 2012
CROSSREFS
KEYWORD
nonn
AUTHOR
Klaus Brockhaus, Feb 04 2001
STATUS
approved