PASCAL 2022 Problem 24

A Pretti number is a seven-digit positive integer with the following properties:

  • The integer formed by its leftmost three digits is a perfect square.
  • The integer formed by its rightmost four digits is a perfect cube.
  • Its ten thousands digit and ones (units) digit are equal.
  • Its thousands digit is not zero.

How many Pretti numbers are there?