Well, it feels like every time I pick up my phone to look at the time, it's xx:17.

I noticed because where I live the number is considered bad luck. Of course I notice because all the other times I pick up the phone and did not get xx:17 I did not register the event. But then, out of fun, I tried to find the number 17 in combination of numbers of the clock and or date and... sure enough, a disproportionate number of times I can get 17 by either summing up the single digits, or groups of digits, or subtracting them. Like, for example, 14:21 -> 14+2+1 = 17, or 19:34 -> 9+1+3+4 = 17, 19:02 -> 19 - 2 = 17 and so on.

Since I am "almost always" able to extract 17 out of the time (sometimes with the help of the date to make it) I wonder if 17 for hours is like 7 for dices: does it have a higher probability of coming up than other numbers? Or is there a number with higher probability?

If we only consider summing all the single digits, the probability distribution function is bell shaped and spans all numbers between 0 and 24 both for the 24h and 12h formats. So, the number with the highest relative probability of coming up is 12,~~ in both cases~~. Whoops, no. It's 12 in the 24h format and 11 in the 12h format.

Here are the number of occurrences for the 24h format

{{0, 1}, {1, 4}, {2, 10}, {3, 19}, {4, 31}, {5, 46}, {6, 62}, {7, 78}, {8, 93}, {9, 107}, {10, 118}, {11, 124}, {12, 125}, {13, 121}, {14, 112}, {15, 98}, {16, 82}, {17, 66}, {18, 51}, {19, 37}, {20, 25}, {21, 16}, {22, 9}, {23, 4}, {24, 1}}

and here are those for the 12h format

{{0, 1}, {1, 4}, {2, 9}, {3, 16}, {4, 24}, {5, 33}, {6, 42}, {7, 50}, {8, 57}, {9, 63}, {10, 67}, {11, 68}, {12, 66}, {13, 61}, {14, 54}, {15, 45}, {16, 36}, {17, 28}, {18, 21}, {19, 15}, {20, 10}, {21, 6}, {22, 3}, {23, 1}, {24, 0}}

But this just one of the ways of combining the digits to get a number. I could sum the first two digit and then subtract the sum of the last two, or summing the first, third and fourth and subtracting the second. How to get all the possible combinations?