[REOPENED]
The question product distinct prime factors of prime(n)-1 and prime(n)+1product distinct prime factors of prime(n)-1 and prime(n)+1 has been closed as "unclear". I edited in a suggested clarification, and OP has indicated that my edit conveys OP's intentions. Please consider voting to reopen.