Author |
Topic: Curious numbers (Read 717 times) |
|
FiBsTeR
Senior Riddler
Gender:
Posts: 581
|
|
Curious numbers
« on: Jul 7th, 2018, 6:26am » |
Quote Modify
|
A k-curious number is a positive integer s such that when you multiply s by k, you get s except with the right-most digit moved to the left. For example, the smallest 4-curious number is 102564 because: 102564 * 4 = 410256 The smallest 5-curious number is 142857 because: 142857 * 5 = 714285 What is the smallest 6-curious 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 7th, 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^K-6)*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 #python-code for K in range(100): for D in range(1,10): X = (10**K-6)*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 7th, 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 9th, 2018, 7:34am » |
Quote Modify
|
Nice, that's right!
|
|
IP Logged |
|
|
|
|