Rating: 0

tl;dr:
1. Brute-force the subtraction part
2. Factor `p-i` and use this for creating the primorial and divisor

Full writeup: https://github.com/p4-team/ctf/tree/master/2019-11-16-asis-finals/truncated_form