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

Maybe some thinking about individual digit positions could shed some light. Let's call the last digit d_0, the next to last d_1, and so on.

d_0 follows a simple pattern: 1, 2, 4, 8, 6, 2, ..., and so never has a zero. It ends up in this pattern [2, 4, 8, 6], and throws two carries over to d_1.

d_1 goes 0, 0, 0, 0, 1, 3, 6, 2, 5, 1, 2, 4, 9, 8, 6, 2, 4. It ends up repeating [8, 6, 2, 4], and throwing two carries to d_1.

In general, d_n starts off with a sequence of 0, until it gets the first carry from d_{n-1}, then tries to fall into 1, 2, 4, 8, 6, 2, ..., but the carries from the previous column perturb that. However, the carries come in on a pattern, and so the result will be that d_n ends up in a cycle.

I haven't looked past the first couple of columns, but I'd not be surprised if there is a predictable pattern in these cycles and their phases that would allow someone to work out a considerable amount about the occurrences of any specific digits in powers of two.

EDIT: I missed a carry when doing d_1. d_1 goes 0,0,0,0,1,3,6,2,5,1,2,4,9,9,8,6,3,7,4,8,7,5,0,0 and repeats [1,3,6,2,5,1,2,4,9,9,8,6,3,7,4,8,7,5,0,0]. It throws 10 carries into d_2.



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

Search: