## Discrepancy of a Golden-ratio-related sequence

Here is a plot and some values of (a variant of) the discrepancy proposed by Tim Gowers: $x_n=sign [ \sin(m\pi (\sqrt{5}-1)) ]$, and $x_1=1$, where $m$ is the number of prime factors of $n$ counted with multiplicity.

I’ve taken the data on prime factors from the OEIS, sequence A001222, this numerical file, and I’m computing the partial sums $x_1+\dots +x_n$.

n $x_n$ partial sum
2 -1 0
3 -1 -1
4 1 0
5 -1 -1
6 1 0
7 -1 -1
8 -1 -2
9 1 -1
10 1 0
11 -1 -1
12 -1 -2
13 -1 -3
14 1 -2
15 1 -1
16 1 0
17 -1 -1
18 -1 -2
19 -1 -3
20 -1 -4
21 1 -3
22 1 -2
23 -1 -3
24 1 -2
25 1 -1
26 1 0
27 -1 -1
28 -1 -2
29 -1 -3
30 -1 -4
31 -1 -5
32 1 -4
33 1 -3
34 1 -2
35 1 -1
36 1 0
37 -1 -1
38 1 0
39 1 1
40 1 2
41 -1 1
42 -1 0
43 -1 -1
44 -1 -2
45 -1 -3
46 1 -2
47 -1 -3
48 1 -2
49 1 -1
50 -1 -2
51 1 -1
52 -1 -2
53 -1 -3
54 1 -2
55 1 -1
56 1 0
57 1 1
58 1 2
59 -1 1
60 1 2
61 -1 1
62 1 2
63 -1 1
64 -1 0
65 1 1
66 -1 0
67 -1 -1
68 -1 -2
69 1 -1
70 -1 -2
71 -1 -3
72 1 -2
73 -1 -3
74 1 -2
75 -1 -3
76 -1 -4
77 1 -3
78 -1 -4
79 -1 -5
80 1 -4
81 1 -3
82 1 -2
83 -1 -3
84 1 -2
85 1 -1
86 1 0
87 1 1
88 1 2
89 -1 1
90 1 2
91 1 3
92 -1 2
93 1 3
94 1 4
95 1 5
96 -1 4
97 -1 3
98 -1 2
99 -1 1
100 1 2
101 -1 1
102 -1 0
103 -1 -1
104 1 0
105 -1 -1
106 1 0
107 -1 -1
108 1 0
109 -1 -1
110 -1 -2
111 1 -1
112 1 0
113 -1 -1
114 -1 -2
115 1 -1
116 -1 -2
117 -1 -3
118 1 -2
119 1 -1
120 1 0
121 1 1
122 1 2
123 1 3
124 -1 2
125 -1 1
126 1 2
127 -1 1
128 1 2
129 1 3
130 -1 2
131 -1 1
132 1 2
133 1 3
134 1 4
135 1 5
136 1 6
137 -1 5
138 -1 4
139 -1 3
140 1 4
141 1 5
142 1 6
143 1 7
144 -1 6
145 1 7
146 1 8
147 -1 7
148 -1 6
149 -1 5
150 1 6
151 -1 5
152 1 6
153 -1 5
154 -1 4
155 1 5
156 1 6
157 -1 5
158 1 6
159 1 7
160 -1 6
161 1 7
162 1 8
163 -1 7
164 -1 6
165 -1 5
166 1 6
167 -1 5
168 1 6
169 1 7
170 -1 6
171 -1 5
172 -1 4
173 -1 3
174 -1 2
175 -1 1
176 1 2
177 1 3
178 1 4
179 -1 3
180 1 4
181 -1 3
182 -1 2
183 1 3
184 1 4
185 1 5
186 -1 4
187 1 5
188 -1 4
189 1 5
190 -1 4
191 -1 3
192 1 4
193 -1 3
194 1 4
195 -1 3
196 1 4
197 -1 3
198 1 4
199 -1 3
200 1 4
201 1 5
202 1 6
203 1 7
204 1 8
205 1 9
206 1 10
207 -1 9
208 1 10
209 1 11
210 1 12
211 -1 11
212 -1 10
213 1 11
214 1 12
215 1 13
216 -1 12
217 1 13
218 1 14
219 1 15
220 1 16
221 1 17
222 -1 16
223 -1 15
224 -1 14
225 1 15
226 1 16
227 -1 15
228 1 16
229 -1 15
230 -1 14
231 -1 13
232 1 14
233 -1 13
234 1 14
235 1 15
236 -1 14
237 1 15
238 -1 14
239 -1 13
240 -1 12
241 -1 11
242 -1 10
243 1 11
244 -1 10
245 -1 9
246 -1 8
247 1 9
248 1 10
249 1 11
250 1 12
251 -1 11
252 1 12
253 1 13
254 1 14
255 -1 13
256 -1 12
257 -1 11
258 -1 10
259 1 11
260 1 12
261 -1 11
262 1 12
263 -1 11
264 1 12