# Find a Strobogrammatic number, so if we square it, the result is a pandigit number

Find a Strobogrammatic number, so that if we square it, the result is a pandigit number.

Note:

• A Strobogrammatic number is a number when typed on a calculator, and the calculator is spun 180 degrees, the number visually looks the same. (example 6229, 18881)
• A pandigit number is a number containing the digits 0-9, where each digit appears exactly once. (example 1234567890, 1203456789)
• Because there are only a few possibilities, I tagged this puzzle as .

A number is

99066

When squared it becomes

9814072356

Explanation

I cutdown the possible answers by doing the following:
Determined the min strobogrammatic number to form a 10 digit number which was 3???? This gets rid of 1,2 as a leading digit (down from 210 to 140 possible answers)
The pandigit number is divisible by 9 (sum of digits is divisible by 9) and if N^2 is divisible by 9 then N is divisible by 3 (and the sum of digits of N is divisible by 3
Each number (x) in the center adds x mod 3 to the total of the digits so we have

 0 mod 3 = 0
1 mod 3 = 1
2,5,8 mod 3 = 2  

Each number (2) in either of the outside numbers adds 2x mod 3 to the total (or in the case of 6,9 it adds 15 mod 0)

 0*2 mod 3 = 0
6+9 mod 3 = 0
9+6 mod 3 = 0
2*2 mod 3 = 1
5*2 mod 3 = 1
8*2 mod 3 = 1
1*2 mod 3 = 2 

So we need to choose 2 of the outside digits (only can choose one 0) and 1 of the inner digits
At this point I just tried a few numbers (and happily stated at high numbers) although to carry it through for a final possibility of numbers
Regex shows 1,2,3rd numbers, 4th and 5th are set based on the first 2 numbers

 +----------------+---------------+
|    Regex       | Possibilities |
+----------------+---------------+
| [58][069][258] |            18 |
| [58][258]1     |             6 |
| [58]10         |             2 |
| [69][069]0     |             6 |
| [69][258][258] |            18 |
| [69]11         |             2 |
+----------------+---------------+

Gives a total of 52 possible inputs.
Which is still a fair number to try by hand and I'll admit I didn't realize no computer also meant no calculator until this morning, I thought it was mainly to prevent coded brute force solutions.

• Out of curiosity, how did you go about getting to this number? Just trying stuff? Sep 29, 2016 at 3:38
• @DanRussell I think just trying stuff. The number must be a 5 digits number, and there are only 210 strobogrammatic 5 digits numbers. Sep 29, 2016 at 3:41
• Right, I was just wondering if there was a rationale other than "just try all 210". Sep 29, 2016 at 3:42
• And the number must be divisible by 3 Sep 29, 2016 at 3:44
• @DanRussell I added some explanation I didn't yesterday as I was on my phone. I don't know if there is a way to cut it down to less then 52 possibilities. Sep 29, 2016 at 15:52

16969691 is the smallest Strobogrammatic prime, so if we square it, the result is a pandigital number :

16969691^2 = 287970412635481

....K.D. Bajpai

• the result of the squaring does not result in a pandigital number as outlined by the OP Oct 27, 2017 at 19:53