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

Home > Numbers
4 and 5 powered (Posted on 2019-04-12) Difficulty: 3 of 5
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.)
Solution computer solution Comment 1 of 1
   5     dim had(9)
  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) 
  72        :had(v1)=1
  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:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (2)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (1)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2019 by Animus Pactum Consulting. All rights reserved. Privacy Information