Work from the back.
Let a be 2 (you can choose other numbers and get other results)
Let b stabd for each digit. Then
2*bbb...bbb2 = 2bbb...bbb
Then the last digit of b must be 4, since it is 2*a. So, now it is
2*bbb...bb42 = 2bbb...bb4
Now look at the second to last digit.
So now the end is 42. 2*42 = 84, so the next digit is 8:
2*bbb...bb842 = 2bbb...bb84
2*842 = 1684, so the next digit is 6 (don't forget the carry!)
2*6842 = 13684, so the next digit is 3 (and a carry again)
2*36842 = 73684, so the next digit is 7.
2*736842 = 1473684 (carry!), so the next digit is 4.
2*4736842 = 9473684, so the next digit is 9
2*94736842 = 189473684, so the next digit is 8 (carry!)
2*894736842 = 1789473684, so the next digit is 7 (carry!)
2*7894736842 = 15789473684, so the next digit is 5 (carry!)
Continue in this manner until you get an initial digit of 1, with no carry:
105263157894736842.
I think this works. You can choose other numbers for a and it might work better.
*edit*
Interesting, I looked at this some more, and found a pattern: rotate the digits.
105263157894736842*2 = 210526315789473684
210526315789473684*2 = 421052631578947368
315789473684210526*2 = 631578947368421052
421052631578947368*2 = 842105263157894736
157894736842105263*2 = 315789473684210526
263157894736842105*2 = 526315789473684210
368421052631578947*2 = 736842105263157894
473684210526315789*2 = 947368421052631578
0578947368421052631*2 = 1057894736842105263
These work for the 4 initial single digits that can be doubled without a carry. The carried digit messes up the pattern, so it doesn't work for them. There are 2 solutions for each of the digits 1-4, one where the second highest digit has no carry and one where it does.
It doesn't work for a last digit of 0 (since moving that to the front divides by 10), and doesn't really work for 1 unless you allow a leading 0 (the last example)
And, with a little practice, you can get other multipliers. Unless I made a mistake, rotating the last digit of the following multiplies it by 3:
1034482758620689655172413793
*more edit* I wrote a short routine in elisp to test this. Multiplying by 4 works out a lot shorter, each is only 6 digits rather than 19:
230769*4 = 923076
205128*4 = 820512
...
025641*4 = 102564
The worst is 6, where the answers have 58 digits.
It appears to have to do with sets of pairs of numbers (d, c) where d is a digit 0-9 and c is the carry from the previous digit multiplication. The length of the number corresponds to the length of cycles in the set.
Last entry: here are examples for multipliers from 2 to 25, allowing leading 0's. The first number is the multiplier, the second is the length of the string, the 3rd is the number. That is, the 3rd number is multiplied by the first number by moving the last digit (4) to its front. (for any who care, the routine is essentially a 2-line function written in elisp.)
(rm-table 25 4)
2 (18): 210526315789473684
3 (28): 1379310344827586206896551724
4 (6): 102564
5 (42): 081632653061224489795918367346938775510204
6 (58): 0677966101694915254237288135593220338983050847457627118644
7 (22): 0579710144927536231884
8 (13): 0506329113924
9 (44): 04494382022471910112359550561797752808988764
10 (2): 04
11 (108): 036697247706422018348623853211009174311926605504587155963302752293577981651376146788990825688073394495412844
12 (48): 033613445378151260504201680672268907563025210084
13 (21): 031007751937984496124
14 (46): 0287769784172661870503597122302158273381294964
15 (148): 0268456375838926174496644295302013422818791946308724832214765100671140939597315436241610738255033557046979865771812080536912751677852348993288590604
16 (13): 0251572327044
17 (78): 023668639053254437869822485207100591715976331360946745562130177514792899408284
18 (178): 0223463687150837988826815642458100558659217877094972067039106145251396648044692737430167597765363128491620111731843575418994413407821229050279329608938547486033519553072625698324
19 (6): 021164
20 (99): 020100502512562814070351758793969849246231155778894472361809045226130653266331658291457286432160804
21 (18): 019138755980861244
22 (8): 01826484
23 (228): 017467248908296943231441048034934497816593886462882096069868995633187772925764192139737991266375545851528384279475982532751091703056768558951965065502183406113537117903930131004366812227074235807860262008733624454148471615720524
24 (7): 0167364
25 (41): 01606425702811244979919678714859437751004
*edit (OK, one more)*
Distribution of the digits: This shows the maximum is 10*n - 2, where 2-8 occur n times each, 0 and 9 n - 1. In the first 25 there are 7 where this occurs, 2 3 6 11 15 18 23. I don't see an obvious pattern
(rm-digit-count 25 4)
2 (18): [1 2 2 2 2 2 2 2 2 1]
3 (28): [2 3 3 3 3 3 3 3 3 2]
4 (6): [1 1 1 0 1 1 1 0 0 0]
5 (42): [4 4 4 5 4 4 5 4 4 4]
6 (58): [5 6 6 6 6 6 6 6 6 5]
7 (22): [2 3 2 2 3 2 1 3 2 2]
8 (13): [2 2 2 2 1 1 1 0 0 2]
9 (44): [5 5 5 2 5 5 2 5 5 5]
10 (2): [1 0 0 0 1 0 0 0 0 0]
11 (108): [10 11 11 11 11 11 11 11 11 10]
12 (48): [9 5 6 5 4 5 6 3 4 1]
13 (21): [3 3 1 2 3 1 1 3 1 3]
14 (46): [4 5 7 4 3 3 4 7 5 4]
15 (148): [14 15 15 15 15 15 15 15 15 14]
16 (13): [2 1 3 1 2 2 0 2 0 0]
17 (78): [8 7 8 8 8 8 8 8 7 8]
18 (178): [17 18 18 18 18 18 18 18 18 17]
19 (6): [1 2 1 0 1 0 1 0 0 0]
20 (99): [12 11 13 9 9 11 11 7 9 7]
21 (18): [2 3 1 1 2 2 1 1 3 2]
22 (8): [1 1 1 0 2 0 1 0 2 0]
23 (228): [22 23 23 23 23 23 23 23 23 22]
24 (7): [1 1 0 1 1 0 2 1 0 0]
25 (41): [5 6 3 1 6 3 3 6 3 5]
2007-02-24 00:47:49
·
answer #1
·
answered by sofarsogood 5
·
1⤊
3⤋
More generally, work in base b with the original number being RS where R has n base b digits and S has m base b digits. We multiple by k to get SR. (The notation is string concatenation, not multiplication.) Then:
RS = ((b^m) * R) + S
SR = ((b^n) * S) + R
SR = (RS) * k
So you get:
(b^m * R * k) + (S * k) = (b^n * S) + R
or
((k * b^m) - 1) * R = (b^n - k) * S
In your specific case with base b = 10, multiplying by k = 2, and S being a single digit (length S = m = 1), you get:
((2 * 10^1) - 1) * R = (10^n - 2) * S
or
19 * R = (10^n - 2) * S, S a single digit
This simplifies because 19 is a prime and so either 19 divides 10^n -2 or 19 divides S, or both. But a single digit is less than 19 so 19 divides the digit S if and only if S = 0. Then 19 * R = (10^n - 2) * 0 = 0 so R = 0. And yes, RS = a string of one or more 0's is a solution to the problem.
But if S is not 0, then 19 cannot divide S and so 19 must divide 10^(n-2). Since 10 is a primitive root modulo 19 (i.e., it is a generator of the cyclic multiplicative group of nonzero residues modulo 19), we find solutions for all n of the form:
(19 - 1)*j + something
where something works out to be 17. So for j = 0,, 1, 2, ... we have solutions for n = 18*j = 17 = 17, 35, 53, ...
Solving 19 * R = (10^17 - 2) * S gives R = 5263157894736842 * S, with the restriction that R have length 17. For S = 1, ..., 9 we get
S 05263157894736842 R 1
S 10526315789473684 R 2
S 15789473684210526 R 3
S 21052631578947368 R 4
S 26315789473684210 R 5
S 31578947368421052 R 6
S 36842105263157894 R 7
S 42105263157894736 R 8
S 47368421052631578 R 9
and indeed doublings give you
052631578947368421
105263157894736842
105263157894736842
210526315789473684
157894736842105263
315789473684210526
210526315789473684
421052631578947368
263157894736842105
526315789473684210
315789473684210526
631578947368421052
368421052631578947
736842105263157894
421052631578947368
842105263157894736
473684210526315789
947368421052631578
Use n = 35, 53, ... to get even longer solutions.
If you had multiplied by k = 3, ..., 9 instead of by k = 2, then you would end up with:
k = 2 : 19 * R = (10^n - 2) * S
k = 3 : 29 * R = (10^n - 3) * S
k = 4 : 39 * R = (10^n - 4) * S
k = 5 : 49 * R = (10^n - 5) * S
k = 6 : 59 * R = (10^n - 6) * S
k = 7 : 69 * R = (10^n - 7) * S
k = 8 : 79 * R = (10^n - 8) * S
k = 9 : 89 * R = (10^n - 9) * S
The primes are 19, 29, 59, 79, 89, with 39 = 3 * 13, 49 = 7 * 7, 69 = 3 * 23. In turn we get for nonzero S that the prime multiplying R must divide evenly into 10^n - k.
29 divides (10^n - 3) for n = 27 + 28*j
59 divides (10^n - 6) for n = 57 + 58*j
79 divides (10^n - 8) for n = 12 + 13*j
89 divides (10^n - 9) for n = 43 + 44*j
(from which we see 10 is a primitive root modulo both 29 and 59, but not 79 nor 89).
For 39 (k = 4) and 69 (k = 7) we have 3*13 and 3*23, and again neither 13 nor 23 can divide the nonzero digit S and so they must divide 10^n - k. 13 divides 10^n - 4 for n = 5 + 6*j, yielding solutions for k = 4 of
R 02564 S 1 RS 025641 RS*4 102564
R 05128 S 2 RS 051282 RS*4 205128
R 07692 S 3 RS 076923 RS*4 307692
R 10256 S 4 RS 102564 RS*4 410256
R 12820 S 5 RS 128205 RS*4 512820
R 15384 S 6 RS 153846 RS*4 615384
R 17948 S 7 RS 179487 RS*4 717948
R 20512 S 8 RS 205128 RS*4 820512
R 23076 S 9 RS 230769 RS*4 923076
If you want to move two digits, length S = m = 2, with k = 2 and base 10, then you get 199 * T = (10^n - 2) * S, and 199 divides 10^n - 2 for n = 196 + 198*j. :-) [I assume the same results would come from base b = 100 with m = 1.]
Dan
2007-03-03 12:57:33
·
answer #2
·
answered by ymail493 5
·
0⤊
0⤋
Hello, = = = = = = = = = = = = = = = = = = = In the whole process, we'll exclude the trivial solution 0, 00, 000, 0000, etc = = = = = = = = = = = = = = = = = = = Let's suppose that number is a one digit number. Obviously, the only number fitting the request is 0. = = = = = = = = = = = = = = = = = = = Let's suppose that number is a two digits number with: > X being its number of tens > and I its number of units. That number is then 10.X + I Its double is 20.X + 2.I You want then: 20.X + 2.I = 10.I + X Seeing that equation, X must be even and can be written as 2x: 40.x + 2.I = 10.I + 2.x 20.x + I = 5.I + x 19.x = 4.I For that equality to be true, I would have to be a multiple of 19, hence, not a single digit value. So no solution can be found. = = = = = = = = = = = = = = = = = = = Let's suppose that number is a three digits number with: > C being its number of hundreds. > X being its number of tens > and I its number of units. That number is then 100.C + 10.X + I Its double is 200.C + 20.X + 2.I You want then: 200.C + 20.X + 2.I = 100.I + 10.C + X Seeing that equation, X must be even and can be written as 2x: 200.C + 40.x + 2.I = 100.I + 10.C + 2.x 100.C + 20.x + I = 50.I + 5.C + x 95.C + 19.x = 49.I 19(5.C + x) = 49.I So the one digit I must be a multiple of 19. And that is impossible... = = = = = = = = = = = = = = = = = = = Let's suppose that number is a four digits number with: > M being its number of thousands. > C being its number of hundreds. > X being its number of tens > and I its number of units. That number is then 1000.M + 100.C + 10.X + I Its double is 2000.M + 200.C + 20.X + 2.I You want then: 2000.M + 200.C + 20.X + 2.I = 1000.I + 100.M + 10.C + X Seeing that equation, X must be even and can be written as 2x: 2000.M + 200.C + 40.x + 2.I = 1000.I + 100.M + 10.C + 2x 1000.M + 100.C + 20.x + I = 500.I + 50.M + 5.C + x 950.M + 95.C + 19.x = 499.I 19(50.M + 5.C + x) = 499.I 499 is not a multiple of 19 so the one digit I must be a multiple of 19. And that is impossible... = = = = = = = = = = = = = = = = = = = No need to study further in details... It seems quite evident now that for any n-digits number, we must have the condition: 19[x + 5.C + 50.M + ... +5 ×10ⁿ‾²×(nth digit the right) = (5 ×10ⁿ‾¹ - 1)× I (This should be properly proven by induction I guess). Since the last digit I will NEVER be a multiple of 19. We have to find a value of (5 ×10ⁿ‾¹ - 1) that will be a multiple of 19. 19k = (5 ×10ⁿ‾¹ - 1) 19k + 1 = 5 ×10ⁿ‾¹ 19k + 1 = 10ⁿ / 2 38k + 2 = 10ⁿ
2016-05-24 05:18:29
·
answer #3
·
answered by Anonymous
·
0⤊
0⤋
Naaaasty !
Suppose the original number (N say) has 2-digits, then we may write N = xy where x and y are both single digit numbers.
xy = 10x + y . . . x is in the "tens" position and y the "units position"
However, yx = 10y + x. If this is twicw the original number,
we have 10y + x = 2(10x + y), so 10y + x = 20x + 2y
Trying to solve this gives 8y = 19x !!! Clearly there is no whole-number solution to this for single digits. (8 isn't a factor of 19)
Suppose then that x is a TWO digit number, then
xy = 10x + y as before, but yx = 100y + x (since ymust now be in the "hundreds column)
As before we must have 100y + x = 2(10x + y) and this leads to 98y = 19x. Once again, because 19 is NOT a factor of 98, there is no solution.
Suppose that x is a THREE digit number, then, as before,
xy = 10x + y, but yx = 1000y + x (y is in the "yhousands position)
As before we must have 1000y + x = 2(10x + y), which leads to 998x = 19x and, yes, you've guessed it ! NO solution because 19 is not a factor of 998.
However, a pattern is emerging . . in order to find a solution, we must make 19 a factor of a number that is 999. . 98, with lots of nines followed by an eight.
Will this ever happen ? . . . Yes, provided we can find a number ending in an 8 which is divisible by 19. 38 is the first such number, so if the second-last remainder of our long division of 19 into 999999......98 is a 3, we will have found a solution. This is bound to happen, because 19 happens to be a prime number which has an 18 digit repeating part, so 3 MUST occur as a remainder, thus enabling our division to work.
If you try 99999999999999998 divided by 19 you will get 5263157894736842.
i.e. the equation 99999999999999998y = 19x leads to x = 5263157894736842y.
Try y = 1, then x = 5263157894736842, but this doesn't work since the number we start with is 52631578947368421 (remember it was xy . . x followed by the y), but when we move the units digit to the front of the number to get 15263157894736842, this last number is NOT twice the starting number.
Try y = 2 to get x = 5263157894736842.2 = 10526315789473684;
this makes our (xy) starting number 105263157894736842, and the number with the 2 moved to the front is 210526315789473684 and this number IS exactly twice 105263157894736842.
Hence the smallest answer to your problem is the starting number 105263157894736842
(Phew ! I need a beer . . . several, even.)
2007-03-03 09:45:04
·
answer #4
·
answered by sumzrfun 3
·
0⤊
0⤋
Does it say how many digits it has to have?
I have been thinking about it and I don't think it's possible with 2: here's why...
Call your first number ab, then the second would have to be ba.
So by ab we mean a tens and b units: 10a+b in normal algebraic notation.
And likewise ba means 10b+a
If the second has to be double the first then we get
10b+a = 2(10a+b)
10b+a = 20a +2b
so 8b = 19a, for which there are no integer solutions.
I tried the same method for 3 digits and didn't really get anywhere... sorry!
Just read the answer above mine and would like to add, the second to last digit must be even as well, because it becomes the final digit in the second number, which must be even.
2007-02-24 00:15:30
·
answer #5
·
answered by _Jess_ 4
·
0⤊
2⤋
I think it may be impossible. Here is the proof for a 2 digit number.
The number is AB = 10A +B
The other number is BA = 10B + A
Can we find single digit integers that satisfy
2 (10A + B) = 10B + A ?
20 A + 2B = 10B + A
19A = 8 B
A= 8B/19
No single digit integer solutions.
Also fails for 3 digit numbers.
Maybe someone smarter can prove the general case!
2007-02-24 00:18:40
·
answer #6
·
answered by sevenletters4me 6
·
0⤊
1⤋
Id say this can only be achieved through trial and error... algebra will not allow you to work with individual digits of numbers i dont think... sorry
but... if the if the last digit is even the first digit must be even (as an even number x 2 = an even) if the last digit is odd the first must be even also (as an odd x 2 = an even)
the first digit must always be even!!
hope that helps
2007-02-24 00:15:11
·
answer #7
·
answered by dhdhdfhttnnn 1
·
0⤊
3⤋
One number that works is 263157894736842105.
If you put the last digit (5) at the beginning, you get:
526315789473684210, which is twice 263157894736842105.
2007-02-24 01:21:47
·
answer #8
·
answered by falzoon 7
·
1⤊
1⤋
Well, the first is 00, think about it...
00 switched is 00
00*2 = 00
it is twice and the same.
Cheers,
lol
eDexter
2007-03-03 16:11:32
·
answer #9
·
answered by Anonymous
·
0⤊
0⤋
i do not think there is any 2 digit number like that
2007-02-24 00:03:02
·
answer #10
·
answered by Anonymous
·
1⤊
3⤋