 All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars  perplexus dot info  4 and 5 powered (Posted on 2019-04-12) For some positive integer k both 4k and 5k start with the same digit x.

What are the possible values of x?

 No Solution Yet Submitted by Danish Ahmed Khan No Rating Comments: ( Back to comment list | You must be logged in to post comments.) computer solution Comment 1 of 1
10     For k = 2 To 1549
20       p4 = 4 ^ k
30       p5 = 5 ^ k
40       X1\$ = Left(cutspc(Str(p4)), 1):v1=val(x1\$)
50       X2\$ = Left(cutspc(Str(p5)), 1):v2=val(x2\$)
60       If X1\$ = X2\$ and had(v1)=0 Then
70        :print k , Str(p4) , Str(p5)
80       :End If
90     Next

finds only 4 and 2 as the possible values of x.

The first one for a value of 4 is at k=11 and the first one for a value of 2 is at k = 52. Other values of k show both x=4 and x=2. In the range tested, k= 2 through 1549 there were 74 occurrences of x=4 and 76 of x=2.  Beyond 1549, the fifth power caused overflow.

11   4194304  48828125
52   20282409603651670423947251286016  2220446049250313080847263336181640625

 Posted by Charlie on 2019-04-12 13:24:58 Please log in:

 Search: Search body:
Forums (0)