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

My favorite way, though, is just to make a grid of pairs of integers (numerator, denominator), and then count them by spiraling outward on the grid. This yields duplicates, but that's ok.

Or just enumerate the naturals in base 11. Denote 9+1 by "/". Interpret "/" as a negative sign when it's the first or last base-10 digit, otherwise as division. Pick an associativity.



Oh, that's really nifty.

I first got embarassed by not knowing of that direct way here: http://gowers.wordpress.com/2008/07/30/recognising-countable...




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

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

Search: