Complete the sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 53, 371, ...
series/decimal.hex.reversal New
New entry, edited from material collected for the archive and not yet in a released version.
Problem
Complete the sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 53, 371, ... -- Walter Nissen Jr. <wnissen@cap.gwu.edu> (POSER7)
Show solution
This is a finite sequence. The next (and last) two entries are 5141 and 99481. The sequence consist of those base 10 numbers whose digits are reversed when converted to base 16. For example, 99481 (base 10) is equal to 18499 (base 16). There are no such numbers with more than five digits. This is because if N has k decimal digits then 10^(k-1) <= N < 10^k, and if N has k hex digits then 16^(k-1) <= N < 16^k. But 16^(k-1) > 10^k for k > 5. -- David G Radcliffe <radcliff@alpha2.csd.uwm.edu>