All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars
 perplexus dot info

 Pandigital and Pretty Powerful II (Posted on 2009-05-06)
Find all possible positive integer(s) N, such that the decimal representation of the sum of two distinct perfect powers of N consists of non leading zeroes and contains each of the digits from 0 to 9 exactly once.

 See The Solution Submitted by K Sengupta No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
 basic computer solution Comment 2 of 2 |

DEFDBL A-Z
nlim = SQR(9876543210#)
lnlim = LOG(nlim)
FOR n = 2 TO nlim
plim = 2 * lnlim / LOG(n)
FOR p1 = 2 TO plim
FOR p2 = p1 + 1 TO plim
tot = INT(n ^ p1 + n ^ p2 + .5)
t\$ = LTRIM\$(STR\$(tot))
IF LEN(t\$) = 10 THEN
good = 1
FOR i = 1 TO 9
IF INSTR(i + 1, t\$, MID\$(t\$, i, 1)) > 0 THEN good = 0: EXIT FOR
NEXT
IF good THEN PRINT n; p1; p2, n ^ p1; n ^ p2, tot
END IF
NEXT
NEXT
NEXT

finds

`   n  pwr1 pwr2      n^pwr1     n^pwr2        n^pwr1 + n^pwr2  264   3    4     18399744  4857532416         4875932160 2016   2    3      4064256  8193540096         8197604352`

If it hadn't been required that the powers be distinct, there would have been many more solutions, one of which would have two 4th powers, and the rest of the equal powers as 2. In fact 264 is the one that has two 4th powers.

`  264  3  4     18399744  4857532416      4875932160  264  4  4   4857532416  4857532416      9715064832 2016  2  3      4064256  8193540096      819760435222887  2  2    523814769   523814769      104762953823124  2  2    534719376   534719376      106943875224957  2  2    622851849   622851849      124570369825941  2  2    672935481   672935481      134587096226409  2  2    697435281   697435281      139487056226733  2  2    714653289   714653289      142930657827276  2  2    743980176   743980176      148796035229685  2  2    881199225   881199225      176239845031389  2  2    985269321   985269321      197053864235367  2  2   1250824689  1250824689      250164937839036  2  2   1523809296  1523809296      304761859239147  2  2   1532487609  1532487609      306497521839432  2  2   1554882624  1554882624      310976524839702  2  2   1576248804  1576248804      315249760840293  2  2   1623525849  1623525849      324705169841997  2  2   1763748009  1763748009      352749601842843  2  2   1835522649  1835522649      367104529843059  2  2   1854077481  1854077481      370815496244922  2  2   2017986084  2017986084      403597216845258  2  2   2048286564  2048286564      409657312845624  2  2   2081549376  2081549376      416309875246464  2  2   2158903296  2158903296      431780659249059  2  2   2406785481  2406785481      481357096250889  2  2   2589690321  2589690321      517938064253568  2  2   2869530624  2869530624      573906124854354  2  2   2954357316  2954357316      590871463257321  2  2   3285697041  3285697041      657139408259268  2  2   3512695824  3512695824      702539164859727  2  2   3567314529  3567314529      713462905860984  2  2   3719048256  3719048256      743809651261098  2  2   3732965604  3732965604      746593120861611  2  2   3795915321  3795915321      759183064261866  2  2   3827401956  3827401956      765480391262634  2  2   3923017956  3923017956      784603591265436  2  2   4281870096  4281870096      856374019268823  2  2   4736605329  4736605329      947321065868982  2  2   4758516324  4758516324      951703264869087  2  2   4773013569  4773013569      954602713869696  2  2   4857532416  4857532416      971506483269732  2  2   4862551824  4862551824      972510364869798  2  2   4871760804  4871760804      9743521608`

 Posted by Charlie on 2009-05-06 13:10:35

 Search: Search body:
Forums (0)
Random Problem
Site Statistics
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox: