The prime iterator (u_forprime_arith_init etc.) internally works in arithmetic progressions. Would it be possible to expose this to the user? (Perhaps "forprimestep", or maybe an optional final (INTMOD) argument to forprime like prod.)
This would be useful, not very hard to implement, and can't be efficiently duplicated in gp.
Charles Greathouse
Case Western Reserve University