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.

A215029 To get a(n), start with m=n, let p = largest prime < m, set m = m-p if m>0, or m=m+p if m <= 0; repeat until p=2 has been processed; set a(n) = m.

Table of values

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

List of values

[0, 1, 2, 1, -1, 0, 0, 1, 1, 2, -1, 0, 0, 1, 1, 2, -1, 0, 0, 1, 1, 2, -1, 0, 0, 1, 0, 1, 0, 1, 1, 2, 0, 1, 0, 1, 0, 1, -1, 0, 1, 2, 0, 1, -1, 0, 1, 2, 0, 1, 0, 1, 0, 1, -1, 0, 1, 2, -1, 0, 0, 1, 1, 2, -1, 0, 1, 2, 0, 1, 0, 1, -1, 0, 0, 1, 0, 1, 0, 1, 1, 2, -1, 0, 0, 1, 0, 1, 0, 1, 1, 2, -1, 0, 1, 2, -1, 0, 0, 1, 0, 1, 1, 2, 0, 1, 0, 1, -1, 0, 0, 1, 0, 1, 1]