Smith Numbers While skimming his phone directory in 1982, mathematician Albert Wilansky noticed that the telephone number of his brother-in-law H. Smith had the following peculiar property: The sum of the digits of that number was equal to the sum of the digit…

2020年1月17日 0条评论 1061点热度 0人点赞 code 阅读全文

From Euclid, it is known that for any positive integers A and B there exist such integers X and Y that AX + BY = D, where D is the greatest common divisor of A and B. The problem is to find the corresponding X, Y, and D for a given A and B.

2020年1月17日 0条评论 1084点热度 0人点赞 code 阅读全文

There is man named Mabu who switches on-off the lights along a corridor at our university. Every bulb has its own toggle switch that changes the state of the light. If the light is off, pressing the switch turns it on. Pressing it again will turn it off. Initi…

2020年1月17日 0条评论 1665点热度 0人点赞 code 阅读全文

<p>Certain cryptographic algorithms make use of big prime numbers. However, checking whether a big number is prime is not so easy. Randomized primality tests exist that offer a high degree of confidence of accurate determination at low cost, such as the …

2020年1月17日 0条评论 1338点热度 0人点赞 code 阅读全文

Self-describing Sequence Solomon Golomb's self-describing sequence {f (1), f (2), f (3),...} is the only non-decreasing sequence of positive integers with the property that it contains exactly f (k) occurrences of k for each k. A few moment's thought reveals t…

2020年1月17日 0条评论 1695点热度 0人点赞 code 阅读全文

Consider the process of stepping from integer x to integer y along integer points of the straight line. The length of each step must be non-negative and can be one bigger than, equal to, or one smaller than the length of the previous step. What is the minimum …

2020年1月17日 0条评论 1176点热度 0人点赞 code 阅读全文