How was 59 days determined with 1 TH/sec from "Mastering Bitcoin" In Mastering Bitcoin in the section on Difficulty Bits Andreas notes: 


  This means that a valid block for height 277,316 is one that has a block header hash that is less than the target. In binary that number would have more than the first 60 bits set to zero. With this level of difficulty, a single miner processing 1 trillion hashes per second (1 tera-hash per second or 1 TH/sec) would only find a solution once every 8,496 blocks or once every 59 days, on average.


How was 59 days calculated?

2^60 (1.15 x 10^18) would be the number of possible values to cycle through and 1 TH/s = 1 x 10^12 attempts every second but what am I missing?
There are 2^256 possible hashes and your source gives a target value of 238348*2^176, requiring more than 60 bits of leading zeros (61 in fact, plus the slightly stricter requirement that a valid hash must be smaller than the target value and not just start with the same number of leading zeros). In fact, the fraction of acceptable hashes out of all possible hashes is 238348*2^-80. Multiplied with 10^12 hashes tested per second, multiplied with 24*60*60 seconds per day, you get a probability of finding a valid hash of about 1 / 58.70 per day, or (as reciprocal) 58.70 days per valid hash on average.

You ask how 8496 was calculated. I note that 8496 = 59 * 24 * 6, so assuming you round to exactly 59 days per valid hash and use the nominal target of having one new block recorded in the blockchain every 10 minutes (hence 24*6 per day), then with a constant, steady-state target you would indeed expect to get lucky, on average, once every 8496 blocks by finding a valid block yourself. Obviously, there is an issue with the stated precision; according to my calculation, even just the rounding to 8500 blocks would only barely be correct.