SCRIPT
DIM i
DIM k
DIM n,0
DIMS t
OPENFILEOUT myf,a(n).txt
LABEL loop
SET n,n+1
IF n>10000 THEN END
SET k,-1
LABEL bou
SET k,k+2
SETS t,%d,%d,%d\,;n;k;-1
PRP k*2^n-1,t
IF ISPRP THEN GOTO a
SETS t,%d,%d,%d\,;n;k;1
PRP k*2^n+1,t
IF ISPRP THEN GOTO b
GOTO bou
LABEL a
WRITE myf,t
GOTO loop
LABEL b
WRITE myf,t
GOTO loop