I got the same as you, dooglus - except that you've included all 512 rolls, when it's only on the 9th that the first time 9 losses in a row can occur - so you can only include rolls 9 to 512. That changes the result slightly: (1 - 0.505**9) ** 504 = 0.3403612.
A couple of extras: Since this is a series of trials with the probability of 9 losses in a row occurring being 0.505**9, the number of rolls until 9 in a row occurs is a geometrically distributed variable for X = 1, 2, 3... - which makes expected values and confidence intervals easy to calculate.
Expected number of rolls until 9 losses in a row = 1/ 0.505**9 = 468.142
95% confidence interval for number of rolls until 9 losses in a row = 12 to 1726 rolls.
If the attempt is made multiple times, 50% of the time 9 losses in a row will occur before 325 rolls.
I wouldn't use this as an investment vehicle

I used your formula, and I put it into a spreadsheet, and came up with this:
if p = the probability to win a game (the game percentage / 100 ) and n=number of losses in a row, then:
* The average number of loss runs until the next expected number of losses in a row: (1-p)^(1-1/p)/p
* The average number of loss runs until the next n losses in a row: ((1 - p)^-n)/p
* The average number of loss runs until the next greater than n run of losses in a row: (1 - p)^-(n+1)
p n next next n greater n
0.877779 5 1.5266 41,772.0366 300,002.5896
0.877779 6 1.5266 341,774.6261 2,454,591.1878
Would you be so kind as to tell me what this means? I don't quite get "The average number of loss runs until the next ..."
The numbers are in order of your formulas. p, n, next expected, next n, next greater.