Do we really know for sure that GPT4 has not seen this problem already?
Nevertheless, I think the more important question is whether GPT-4 is capable of
1) Listing all solutions less than 100
2) Figuring out the commonalities of the solutions
For 1) I have no doubt that the answer is yes based on its coding skills, in fact it is much stronger at coding than this. For 2) my subjective feeling in playing around with it is it's not consistent at similar problems but it can do it sometimes. Maybe in this case it has seen the list of prime powers <100 so it's very easy for it.