Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Interestingly, in hexadecimal there end up being three largest numbers of length 39:

  0x34e4a468166cd8604ec0f8106ab4326098286cf
  0xaa44ce207c78fc30003c3cc0d8382e2078d07ef
  0xfae06678c2e884607eb8b4e0b0a0f0603420342


You'd expect longer numbers in larger bases. The estimate at Wikipedia (https://en.wikipedia.org/wiki/Polydivisible_number#How_many_...) can be generalized: let F_k(n) be the number of n-digit polydivisible numbers in base k. Then F_k(n) ~ (k-1) * k^(n-1) / n!. This gets bigger as n increases up to n = k, then it gets smaller. If I'm doing the asymptotics right you have F_k(ek) approximately equal to 1 - so in base k the largest polydivisible number should have about ek digits.

The length of the longest polydivisible number in base k is in the OEIS (http://oeis.org/A109783) along with this conjecture.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: