I have just put exactly the same question into copilot using GPT-5 and got exactly the same answer.
I typed it into a google search box in Safari and Apple AI jumped in and again gave exactly the same answer.
I assume it is right but can’t be sure as I have not done it with a spreadsheet.
Chat GPT justified the answer with this comment pasted below
“ Why this is complete (brief): for each two-digit prime p the maximal exponent q that can produce a number < 10^{10} is \lfloor\log_{p}(10^{10}-1)\rfloor. I checked all prime exponents up to that limit for every two-digit prime; only the eight pairs above produced values in the 10-digit range.”
Maybe the precise wording is important. I tried first and missed out the second “prime” in the instruction and nearly broke the internet. It failed and told me it needed too much computing power to do on my subscription.
I am aware AI needs to be used with great caution but the potential power is really exciting.