I tested the first five million values of m and it appears to work. This is the program in UBASIC, noticing that the point "a" is equivalent to m=1 (mod 20). Nothing is printed, so it is OK.

Code:

10 for M=1 to 5000000
20 if 2*M+1<>nxtprm(2*M) or 10*M+1<>nxtprm(10*M) or 16*M+1<>nxtprm(16*M) then 60
30 A=2*M+1:B=10*M+1:C=16*M+1:D=A*B*C
40 if (D-1)@(A-1)<>0 or (D-1)@(B-1)<>0 or (D-1)@(C-1)<>0 then K=0 else K=1
50 if (M@20=1 and K=0) or (M@20<>1 and K=1) then print M,(2*M+1)*(10*M+1)*(16*M+1)
60 next M