# $m^n$ has exactly $9$ digits, all of these digits are distinct.

I was reading the following problem in a book: $$2^{29}$$ has exactly $$9$$ digits, all of these digits are distinct, what is the missing digit?

I tried to solve it, and I did it correctly.

Suddenly, the following two questions popped into my mind:

• Find the number of pairs of natural numbers $$m$$ and $$n$$ $$(n \ne 1)$$ such that $$m^n$$ has exactly $$9$$ digits, all of these digits are distinct.

• Find the least $$9$$-digit number that can be expressed as $$m^n$$ where $$m$$ and $$n$$ are natural numbers and $$n \ne 1$$.

These questions may be solved using a software, but I am not sure if we can use a purely mathematical way.

Do not provide a solution. I am just asking for useful hints/formulae/techniques, then I will try to solve them.

Your help would be appreciated. THANKS!

• How did you solve the case $2^{29}$ ? – TheSilverDoe Nov 18 '20 at 17:38
• Digits are essentially random, there is no known connection between "all digits are distinct" and other properties of a number. So I don't see another option than to check all eligible powers one by one. I wouldn't want to do that manually, but a computer wouldn't find it hard, I guess. – user436658 Nov 18 '20 at 18:52
• I agree with @ProfessorVector - there's really no reason to expect any sort of general connection when digits are so closely tied to their base. Unless you're maybe looking at a base (for the exponent) with some sort of "special relationship" with $10$ (and it's not even clear what such a "special relationship" would be), there's really unlikely to be any general connection of the type you're looking for. Sorry. – Lieutenant Zipp Nov 18 '20 at 19:28

My computer says: $$10124^{2}=102495376$$ $$10128^{2}=102576384$$ $$10136^{2}=102738496$$ $$10214^{2}=104325796$$ $$10278^{2}=105637284$$ $$11826^{2}=139854276$$ $$12363^{2}=152843769$$ $$12543^{2}=157326849$$ $$12582^{2}=158306724$$ $$12586^{2}=158407396$$ $$13147^{2}=172843609$$ $$13268^{2}=176039824$$ $$13278^{2}=176305284$$ $$13343^{2}=178035649$$ $$13434^{2}=180472356$$ $$13545^{2}=183467025$$ $$13698^{2}=187635204$$ $$14098^{2}=198753604$$ $$14442^{2}=208571364$$ $$14676^{2}=215384976$$ $$14743^{2}=217356049$$ $$14766^{2}=218034756$$ $$15353^{2}=235714609$$ $$15681^{2}=245893761$$ $$15963^{2}=254817369$$ $$16549^{2}=273869401$$ $$16854^{2}=284057316$$ $$17252^{2}=297631504$$ $$17529^{2}=307265841$$ $$17778^{2}=316057284$$ $$17816^{2}=317409856$$ $$18072^{2}=326597184$$ $$19023^{2}=361874529$$ $$19377^{2}=375468129$$ $$19569^{2}=382945761$$ $$19629^{2}=385297641$$ $$20089^{2}=403567921$$ $$20316^{2}=412739856$$ $$20513^{2}=420783169$$ $$20754^{2}=430728516$$ $$21397^{2}=457831609$$ $$21439^{2}=459630721$$ $$21744^{2}=472801536$$ $$21801^{2}=475283601$$ $$21877^{2}=478603129$$ $$21901^{2}=479653801$$ $$22175^{2}=491730625$$ $$22456^{2}=504271936$$ $$22887^{2}=523814769$$ $$23019^{2}=529874361$$ $$23113^{2}=534210769$$ $$23178^{2}=537219684$$ $$23439^{2}=549386721$$ $$23682^{2}=560837124$$ $$23728^{2}=563017984$$ $$23889^{2}=570684321$$ $$24009^{2}=576432081$$ $$24237^{2}=587432169$$ $$24276^{2}=589324176$$ $$24441^{2}=597362481$$ $$24807^{2}=615387249$$ $$25059^{2}=627953481$$ $$25279^{2}=639027841$$ $$25572^{2}=653927184$$ $$25941^{2}=672935481$$ $$26152^{2}=683927104$$ $$26351^{2}=694375201$$ $$26409^{2}=697435281$$ $$26733^{2}=714653289$$ $$27105^{2}=734681025$$ $$27129^{2}=735982641$$ $$27209^{2}=740329681$$ $$27273^{2}=743816529$$ $$27984^{2}=783104256$$ $$28171^{2}=793605241$$ $$28256^{2}=798401536$$ $$28346^{2}=803495716$$ $$28582^{2}=816930724$$ $$28731^{2}=825470361$$ $$29034^{2}=842973156$$ $$29106^{2}=847159236$$ $$29208^{2}=853107264$$ $$30384^{2}=923187456$$ $$2^{29}=536870912$$ So there are quite a few squares and just one higher power with that property.