返回题库

循环移位乘以 4

Cyclic 4

专题
Brainteaser / 脑筋急转弯
难度
L6

题目详情

求最小的正整数,它的末位数字是 4,且把末位数字移动到首位(例如 1234→4123)会使该数变为原来的 4 倍。

英文原题

What is the smallest positive integer that ends with the digit 44 such that moving its last digit to the first position (i.e. 1234 => 4123) multiplies the original integer by exactly 44?

解析

设原数为 N=10k+4N=10k+4,其中 kk 有 mm 位(即 0≤k<10m0\le k<10^m)。移位后得到

N′=4⋅10m+k.N'=4\cdot 10^m+k.

题意为 N′=4NN'=4N:

4⋅10m+k=4(10k+4)=40k+16⇒4(10m−4)=39k.4\cdot 10^m+k=4(10k+4)=40k+16 \Rightarrow 4(10^m-4)=39k.

因 gcd⁡(4,39)=1\gcd(4,39)=1,需 39∣(10m−4)39\mid (10^m-4)。计算模 39:

101≡10, 102≡22, 103≡25, 104≡16, 105≡4(mod39).10^1\equiv 10,\ 10^2\equiv 22,\ 10^3\equiv 25,\ 10^4\equiv 16,\ 10^5\equiv 4\pmod{39}.

故最小 m=5m=5。

于是

k=4(105−4)39=4⋅2564=10256,k=\frac{4(10^5-4)}{39}=4\cdot 2564=10256,

所以

N=10k+4=102564.N=10k+4=102564.

验证:410256=4×102564410256=4\times 102564。

答案为 102564\boxed{102564}。


英文解析

The original number is N=10k+4N=10k+4, of which kkhas mm(that is, 0≤k<10m0\le k<10^m). Obtained after displacement

N′=4⋅10m+k.N'=4\cdot 10^m+k.

The title is N′=4NN'=4N:

4⋅10m+k=4(10k+4)=40k+16⇒4(10m−4)=39k.4\cdot 10^m+k=4(10k+4)=40k+16 \Rightarrow 4(10^m-4)=39k.

Because gcd⁡(4,39)=1\gcd(4,39)=1, 39∣(10m−4)39\mid (10^m-4)is required. Computational Module 39:

101≡10,\102≡22,\103≡25,\104≡16,\105≡4(mod39).10^1\equiv 10,\10^2\equiv 22,\10^3\equiv 25,\10^4\equiv 16,\10^5\equiv 4\pmod{39}.

So the minimum is m=5m=5.

as a result

k=4(105−4)39=4⋅2564=10256,k=\frac{4(10^5-4)}{39}=4\cdot 2564=10256,

So

N=10k+4=102564.N=10k+4=102564.

Verification: 410256=4×102564410256=4\times 102564.

The answer is 102564\boxed{102564}.