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.

A065368 Alternating sum of ternary digits in n. Replace 3^k with (-1)^k in ternary expansion of n.

Table of values

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

List of values

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