I am trying to work out the expected frequency distribution in the following scenario:

Start by randomly picking a whole number between 1 & 10, inclusive. This number will be known as the “comparison” number, and this number will never change for the remainder of the exercise.

Now, keep randomly picking a whole number between 1 & 10 until the number you’ve picked matches the comparison number. Keep track of how many “attempts” it takes for this newly randomly selected number to match the comparison number. Did it take three attempts? Fifteen attempts? Did it match on the first attempt? Do this over and over, noting how many attempts it took each time for the newly selected number to match the comparison number. Each time there’s a match, populate the result (ie, number of attempts to get a match) in to a frequency distribution table.
My question is, if you made billions and billions of attempts to match with the comparison number, and you plotted all the number of attempts it took on a distribution chart, what would the frequency distribution look like?
I’ve written a computer program to simulate the scenario until ten million matches get made, but I get (seemingly) weird results each time I run it. Eg, 3, 8, 9 & 12 attempts always come out as the most common results. I was expecting a fairly even distribution between 1 & 10 attempts, and then gradually tail off from 11 attempts and higher. But that’s not what happens. Instead, I see no consistency or pattern in the frequency distribution.
There’s either something wrong with my computer program, something wrong with my random number generator, or the results are correct, but strange.
I’m curious to know what the actual frequency distribution should look like for this scenario, perhaps from someone who knows how to crunch the math, as opposed to me who only knows how to write potentially buggy computer programs. Thanks.
(Below is a typical frequency distribution table generated from my computer program).
# attempts before getting a match to the comparison number: (Iterates until 10 million matches to the comparison number are made)
1 25159 (this means that 25,159 times, the comparison number was matched on the first attempt)
2 82196
3 1898314
4 82070
5 178978
6 100721
7 72615
8 780732
9 2679468
10 53693
11 110693
12 2122718
13 29810
14 22747
15 42720
16 101152
17 753525
18 26014
19 33398
20 99338
21 482611
22 11773
23 12266
24 25387
25 8910
26 6934
27 9987
28 10390
29 51070
30 4822
31 5038
32 5223
33 25111
34 2471
35 2463
36 2791
37 4199
38 10775
39 1805
40 1441
41 2812
42 5378
43 792
44 732
45 906
46 1600
47 606
48 546
49 548
50 775
51 299
52 300
53 279
54 425
55 238
56 189
57 177
58 183
59 154
60 118
61 131
62 110
63 99
64 78
65 87
66 71
67 86
68 68
69 58
70 37
71 37
72 33
73 33
74 28
75 27
76 26
77 26
78 40
79 22
80 19
81 22
82 22
83 13
84 18
85 20
86 14
87 10
88 7
89 15
90 7
91 8
92 9
93 6
94 5
95 7
96 7
97 5
98 4
99 7
100 4
101 5
102 5
103 5
104 5
105 4
106 2
107 1
108 6
109 1
110 4
111 3
112 2
113 2
114 1
115 3
116 3
118 1
119 2
120 1
121 1
122 1
124 3
126 1
129 2
132 1
134 2
136 1
137 1
138 2
139 1
141 1
142 1
145 1
147 1
149 1
158 1
159 1
163 1
164 2
172 1
183 1
199 1
216 1
235 1
251 1
284 1