PFGW & SCRIPTIFY
SCRIPT
DIM i
DIM j
DIM k
DIM ll
DIM n, 0
DIM pp
DIM qq
DIM rr
DIMS t
DIMS st
OPENFILEOUT myf, a(n).txt
LABEL loop1
SET n, n+1
SET k, 1
SET i, 0
SET j, 0
SET ll, 0
LABEL a
SET k, k+1
SET pp, p(k)*2^n-1
SETS t, %d, %d, %d\,; n; k; p(k)
PRP pp, t
IF ISPRP THEN SET qq, pp
IF ISPRP THEN GOTO b
GOTO a
LABEL b
SET i, i+2
SETS t, %d, %d, %d, %d\,; n; k; p(k); i
SET qq, pp+i
PRP qq, t
IF ISPRP THEN GOTO c
GOTO b
LABEL c
IF i%6>0 THEN GOTO y
SET qq, pp-i
SETS t, %d, %d, %d, %d, %d\,; n; k; p(k); i; -i
PRP qq, t
IF ISPRP THEN GOTO d
LABEL x
SET qq, pp+2*i
SETS t, %d, %d, %d, %d, %d\,; n; k; p(k); i; 2*i
PRP qq, t
IF ISPRP THEN GOTO e
LABEL y
SET i, 0
SET j, 0
SET ll, 0
GOTO a
LABEL d
SET j, j+2
IF j==i THEN WRITE myf, t
IF j==i THEN GOTO loop1
SET rr, qq+j
SETS st, %d\,; j
PRP rr, st
IF ISPRP THEN GOTO x
GOTO d
LABEL e
SET ll, ll+2
IF ll==i THEN WRITE myf, t
IF ll==i THEN GOTO loop1
SET rr, qq-ll
SETS st, %d\,; ll
PRP rr, st
IF ISPRP THEN GOTO y
GOTO e