OFFSET
1,1
COMMENTS
EXAMPLE
157 is in the sequence because 2*157 + 1 = 315 = 3 ^ 2 * 5 * 7 => 157 == 1 (mod 3), 157 == 2 (mod 5) and 157 == 3 (mod 7).
MAPLE
with(numtheory):
for n from 2 to 10^5 do:
p:=ithprime(n):q:=2*p+1:x:=factorset(q):n1:=nops(x):j:=0:
for i from 1 to n1 do:
if irem(p, x[i])=i
then j:=j+1:
else
fi:
od:
if j=n1
then
printf(`%d, `, p):
else
fi:
od:
MATHEMATICA
Select[Prime@ Range[10^6], Function[p, Function[i, Times @@ Boole@ MapIndexed[Mod[p, #1] == First@ #2 &, FactorInteger[i][[All, 1]]] > 0][2 p + 1]]] (* Michael De Vlieger, Jan 20 2017 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Lagneau, Jan 20 2017
STATUS
approved