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.

A353158 a(n) is the distance from n to the nearest integer that can be added to n without carries in base 3.

Table of values

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

List of values

[0, 0, 1, 0, 0, 2, 3, 2, 1, 0, 0, 1, 0, 0, 2, 4, 6, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 1, 0, 0, 2, 3, 2, 1, 0, 0, 1, 0, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4]