This is a solution to a code golf contest on Stack Exchange.
node qseq.js
n a(n)
0 1
1 1
2 1
3 2
4 3
5 3
6 4
7 5
8 5
9 6
10 6
11 6
12 8
13 8
14 8
15 10
16 9
17 10
18 11
19 11
20 12