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.

A037879 a(n) = (1/2)*Sum{|d(i)-e(i)|} where Sum{d(i)*2^i} is the base-2 representation of n and {e(i)} are digits {d(i)} in nondecreasing order.

Table of values

n a(n)
1 0
2 0
3 0
4 0
5 1
6 0
7 0
8 0
9 1
10 1
11 1
12 0
13 1
14 0
15 0
16 0
17 1
18 1
19 2
20 1
21 1
22 1
23 1
24 0
25 1
26 1
27 1
28 0
29 1
30 0
31 0
32 0
33 1
34 1
35 2
36 1
37 2
38 2
39 2
40 1
41 1
42 1
43 2
44 1
45 1
46 1
47 1
48 0
49 1
50 1
51 2
52 1
53 1
54 1
55 1
56 0
57 1
58 1
59 1
60 0
61 1
62 0
63 0
64 0
65 1
66 1
67 2
68 1
69 2
70 2
71 3
72 1
73 2
74 2
75 2
76 2
77 2
78 2
79 2
80 1
81 1
82 1
83 2
84 1
85 2
86 2
87 2
88 1
89 1
90 1

List of values

[0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 2, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 2, 1, 2, 2, 2, 1, 1, 1, 2, 1, 1, 1, 1, 0, 1, 1, 2, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 2, 1, 2, 2, 2, 1, 1, 1]