This problem is in Contest(s) below:
Contest 1181:2018小六第二场
Contest 1325:质数问题专题
Contest 1521:初一第一场
Contest 1294:2018新小六加题(1)