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.

A339413 a(0) = 0; for n > 0, a(n) = a(n-1) if c0 == c1; a(n) = a(n-1) - c0 if c0 > c1; a(n) = a(n - 1) + c1 if c1 > c0, where c0 and c1 are respectively the number of 0's and 1's in the binary expansion of n.

Table of values

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

List of values

[0, 1, 1, 3, 1, 3, 5, 8, 5, 5, 5, 8, 8, 11, 14, 18, 14, 11, 8, 11, 8, 11, 14, 18, 15, 18, 21, 25, 28, 32, 36, 41, 36, 32, 28, 28, 24, 24, 24, 28, 24, 24, 24, 28, 28, 32, 36, 41, 37, 37, 37, 41, 41, 45, 49, 54, 54, 58, 62, 67, 71, 76, 81, 87, 81, 76, 71, 67, 62]