Author 
Topic: Curious numbers (Read 695 times) 

FiBsTeR
Senior Riddler
Gender:
Posts: 581


Curious numbers
« on: Jul 7^{th}, 2018, 6:26am » 
Quote Modify

A kcurious number is a positive integer s such that when you multiply s by k, you get s except with the rightmost digit moved to the left. For example, the smallest 4curious number is 102564 because: 102564 * 4 = 410256 The smallest 5curious number is 142857 because: 142857 * 5 = 714285 What is the smallest 6curious number?


IP Logged 



towr
wu::riddles Moderator Uberpuzzler
Some people are average, some are just mean.
Gender:
Posts: 13730


Re: Curious numbers
« Reply #1 on: Jul 7^{th}, 2018, 12:23pm » 
Quote Modify

It seems to be 1016949152542372881355932203389830508474576271186440677966 Say we're trying to find the number N = 10M+D where D is a digit and M a natural number We want 6*(10M+D) = D*10^K + M, where K is the number of digits in M Simplify this to 59*M = (10^K6)*D And now you can do a much more targeted search than running through every number: D is limited to 9 choices, and we can just try increasing K #pythoncode for K in range(100): for D in range(1,10): X = (10**K6)*D if X % 59 == 0: M = X//59 if len(str(10*M+D)) == len(str(D*10**K + M)): print((10*M+D), '', D*10**K + M)

« Last Edit: Jul 7^{th}, 2018, 12:25pm by towr » 
IP Logged 
Wikipedia, Google, Mathworld, Integer sequence DB



FiBsTeR
Senior Riddler
Gender:
Posts: 581


Re: Curious numbers
« Reply #3 on: Jul 9^{th}, 2018, 7:34am » 
Quote Modify

Nice, that's right!


IP Logged 



