{ pppp=ppp=pp=p=0; k=-1; n=0; v=1; forprime (q=2, oo, if (v>=q, v-=q, v+=q ); n++; [pppp,ppp,pp,p] = [ppp,pp,p,v]; if (pppp && pppp>ppp && ppp<pp && pp<p, print (k++ " " n-2); ); ); } quit