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.

A337319 a(n) = Sum_{i = 1..floor(log_2(n))+1} g(frac(n/2^i)), where g(t) = [0 if t = 0, -1 if 0 < t < 1/2, 1 if t >= 1/2], and where frac(x) denotes the fractional part.

Table of values

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

List of values

[1, 1, 2, 1, 1, 2, 3, 1, 0, 1, 2, 2, 2, 3, 4, 1, -1, 0, 1, 1, 1, 2, 3, 2, 1, 2, 3, 3, 3, 4, 5, 1, -2, -1, 0, 0, 0, 1, 2, 1, 0, 1, 2, 2, 2, 3, 4, 2, 0, 1, 2, 2, 2, 3, 4, 3, 2, 3, 4, 4, 4, 5, 6, 1, -3, -2, -1, -1, -1, 0, 1, 0, -1, 0, 1, 1, 1, 2, 3, 1]