TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Kaprekar's Magic 6174

39 点作者 olooney11 个月前

5 条评论

dash211 个月前
Sort the digits to &#x27;wxyz&#x27;, where each letter is a 0-9 digit.<p>&#x27;wxyz&#x27; - &#x27;zyxw&#x27; = 999(w - z) + 90(x - y)<p>w - z is between 1 and 9, since w &gt; z (we have ruled out numbers like 1111). x - y is between 0 and 9. So there are at most 90 such numbers. In fact there are fewer because x-y &lt;= w-z.<p>This is why there are many collisions in the first step.
dimastopel11 个月前
Numberphile video on the topic: <a href="https:&#x2F;&#x2F;youtu.be&#x2F;d8TRcZklX_Q?si=t9x2HLWYOpPiTbn4" rel="nofollow">https:&#x2F;&#x2F;youtu.be&#x2F;d8TRcZklX_Q?si=t9x2HLWYOpPiTbn4</a>
hiperlink11 个月前
Previous discussion: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=39018769">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=39018769</a>
pierrebai11 个月前
Interestingly, there is a common pattern for fixed-points and cycles for different number lengths: numbers made of 4, 5 and 9. For example<p>length 3: fixed-point 495 length 5: 2-cycle containing 59994 length 6: fixed-point 59994<p>Similarly for digits 6, 1, 4, 7:<p>length 4: 6174 length 5: 4-cycle containing 61974 length 6: fixed-point 631764
ur-whale11 个月前
No attempts at generalization to larger numbers of digits?
评论 #40681156 未加载