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.

A118777 a(0) = 1; n > 0: a(n) = a(n-1) + d, d = +-1 if n is prime/nonprime.

Table of values

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

List of values

[1, 2, 1, 0, 1, 0, 1, 0, 1, 2, 3, 2, 3, 2, 3, 4, 5, 4, 5, 4, 5, 6, 7, 6, 7, 8, 9, 10, 11, 10, 11, 10, 11, 12, 13, 14, 15, 14, 15, 16, 17, 16, 17, 16, 17, 18, 19, 18, 19, 20, 21, 22, 23, 22, 23, 24, 25, 26, 27, 26, 27, 26, 27, 28, 29, 30, 31, 30, 31, 32, 33, 32, 33, 32, 33, 34, 35, 36]