OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
Leonard Eugene Dickson, Cyclotomy and trinomial congruences, Transactions of the American Mathematical Society, 37.3 (1935): 363-380. See page 373.
MAPLE
ans:=[];
M:=10000;
e:=7; r:=2;
for k from 2 to M do
p:=ithprime(k);
if p mod 14 = 1 then
for x from 2 to p-1 do
if x^e mod p = r then
ans:=[op(ans), p];
break;
end if;
end do:
end if;
end do:
ans;
# Alternative:
select(p -> isprime(p) and numtheory:-mroot(2, 7, p)<>FAIL, [seq(14*i+1, i=1..3000)]); # Robert Israel, Apr 03 2018
MATHEMATICA
Select[Select[14 Range[10^3] + 1, PrimeQ], Function[p, AnyTrue[Range[2, 10^4], Mod[#^7, p] == 2 &]]] (* Michael De Vlieger, Apr 02 2016, Version 10 *)
PROG
(Magma) [p: p in PrimesUpTo(50000) | IsOne(p mod 14) and exists{x: x in ResidueClassRing(p) | x^7 eq 2}]; // Bruno Berselli, Apr 02 2016
(PARI) forprime(p=2, 10^5, if(p%14!=1, next); if(Mod(2, p)^((p-1)/7)==1, print1(p, ", "))); \\ Joerg Arndt, Apr 03 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Apr 01 2016
STATUS
approved