cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A007931 Numbers that contain only 1's and 2's. Nonempty binary strings of length n in lexicographic order.

Table of values

n a(n)
1 1
2 2
3 11
4 12
5 21
6 22
7 111
8 112
9 121
10 122
11 211
12 212
13 221
14 222
15 1111
16 1112
17 1121
18 1122
19 1211
20 1212
21 1221
22 1222
23 2111
24 2112
25 2121
26 2122
27 2211
28 2212
29 2221
30 2222
31 11111
32 11112
33 11121
34 11122
35 11211
36 11212
37 11221
38 11222
39 12111
40 12112
41 12121
42 12122

List of values

[1, 2, 11, 12, 21, 22, 111, 112, 121, 122, 211, 212, 221, 222, 1111, 1112, 1121, 1122, 1211, 1212, 1221, 1222, 2111, 2112, 2121, 2122, 2211, 2212, 2221, 2222, 11111, 11112, 11121, 11122, 11211, 11212, 11221, 11222, 12111, 12112, 12121, 12122]