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.

A077140 a(1) = 1 and then add n to the previous term if n is coprime to the previous term, otherwise subtract n from the previous term. a(1) = 1 and a(n) = a(n-1) + n if gcd(n, a(n-1)) = 1, otherwise a(n) = a(n-1) - n.

Table of values

n a(n)
1 1
2 3
3 0
4 -4
5 1
6 7
7 0
8 -8
9 1
10 11
11 0
12 -12
13 1
14 15
15 0
16 -16
17 1
18 19
19 0
20 -20
21 1
22 23
23 0
24 -24
25 1
26 27
27 0
28 -28
29 1
30 31
31 0
32 -32
33 1
34 35
35 0
36 -36
37 1
38 39
39 0
40 -40
41 1
42 43
43 0
44 -44
45 1
46 47
47 0
48 -48
49 1
50 51
51 0
52 -52
53 1
54 55
55 0

List of values

[1, 3, 0, -4, 1, 7, 0, -8, 1, 11, 0, -12, 1, 15, 0, -16, 1, 19, 0, -20, 1, 23, 0, -24, 1, 27, 0, -28, 1, 31, 0, -32, 1, 35, 0, -36, 1, 39, 0, -40, 1, 43, 0, -44, 1, 47, 0, -48, 1, 51, 0, -52, 1, 55, 0]