OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
MAPLE
select(p -> isprime(p) and [msolve(x^6=2, p)]<>[] and [msolve(x^36=2, p)]=[] , [seq(i, i=3..10^4, 2)]); # Robert Israel, May 13 2018
PROG
(PARI) forprime(p=2, 3700, x=0; while(x<p&&x^6%p!=2%p, x++); if(x<p, y=0; while(y<p&&y^(6^2)%p!=2%p, y++); if(y==p, print1(p, ", "))))
(Magma) [p: p in PrimesUpTo(5000) | not exists{x: x in ResidueClassRing(p) | x^36 eq 2} and exists{x: x in ResidueClassRing(p) | x^6 eq 2}]; // Vincenzo Librandi, Sep 21 2012
(PARI)
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, 10^4, if (ok(p, 2, 6, 6^2), print1(p, ", ")));
/* Joerg Arndt, Sep 21 2012 */
(Python)
from itertools import count, islice
from sympy import nextprime, is_nthpow_residue
def A070183_gen(startvalue=2): # generator of terms >= startvalue
p = max(nextprime(startvalue-1), 2)
while True:
if is_nthpow_residue(2, 6, p) and not is_nthpow_residue(2, 36, p):
yield p
p = nextprime(p)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Klaus Brockhaus, Apr 29 2002
STATUS
approved