Just in case anyone is interested I made a look-up table. 101 entries in the table from 0-100%. Obviously 100% would be an infinite number of weeks so I cut it at 100 million weeks which is a probability of having won of about 99.8%. 0% is week 1.
<?php
$lookup = array(0 => 1, 1 => 140543, 2 => 282511, 3 => 425936, 4 => 570848, 5 => 717276, 6 => 865255, 7 => 1014816, 8 => 1165994, 9 => 1318824, 10 => 1473343, 11 => 1629588, 12 => 1787599, 13 => 1947416, 14 => 2109080, 15 => 2272635, 16 => 2438126, 17 => 2605599, 18 => 2775102, 19 => 2946685, 20 => 3120399, 21 => 3296299, 22 => 3474439, 23 => 3654878, 24 => 3837675, 25 => 4022894, 26 => 4210599, 27 => 4400858, 28 => 4593742, 29 => 4789323, 30 => 4987678, 31 => 5188888, 32 => 5393035, 33 => 5600206, 34 => 5810493, 35 => 6023991, 36 => 6240799, 37 => 6461021, 38 => 6684767, 39 => 6912151, 40 => 7143294, 41 => 7378322, 42 => 7617368, 43 => 7860571, 44 => 8108079, 45 => 8360046, 46 => 8616638, 47 => 8878025, 48 => 9144392, 49 => 9415931, 50 => 9692848, 51 => 9975359, 52 => 10263696, 53 => 10558104, 54 => 10858843, 55 => 11166192, 56 => 11480449, 57 => 11801931, 58 => 12130978, 59 => 12467954, 60 => 12813252, 61 => 13167292, 62 => 13530530, 63 => 13903454, 64 => 14286598, 65 => 14680535, 66 => 15085893, 67 => 15503352, 68 => 15933659, 69 => 16377628, 70 => 16836157, 71 => 17310232, 72 => 17800945, 73 => 18309505, 74 => 18837262, 75 => 19385720, 76 => 19956570, 77 => 20551720, 78 => 21173329, 79 => 21823861, 80 => 22506139, 81 => 23223421, 82 => 23979493, 83 => 24778794, 84 => 25626566, 85 => 26529072, 86 => 27493868, 87 => 28530195, 88 => 29649516, 89 => 30866289, 90 => 32199117, 91 => 33672495, 92 => 35319598, 93 => 37186940, 94 => 39342644, 95 => 41892327, 96 => 45012938, 97 => 49036215, 98 => 54707013, 99 => 64402795, 100 => 100000000);
echo(mt_rand($lookup[($rand = mt_rand(0, 99)) - 1], $lookup[$rand+1])).' weeks';
?>