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.

A064389 Variation (4) on Recamán's sequence (A005132): to get a(n), we first try to subtract n from a(n-1): a(n) = a(n-1) - n if positive and not already in the sequence; if not then we try to add n: a(n) = a(n-1) + n if not already in the sequence; if this fails we try to subtract n+1 from a(n-1), or to add n+1 to a(n-1), or to subtract n+2, or to add n+2, etc., until one of these produces a positive number not already in the sequence - this is a(n).

Table of values

n a(n)
1 1
2 3
3 6
4 2
5 7
6 13
7 20
8 12
9 21
10 11
11 22
12 10
13 23
14 9
15 24
16 8
17 25
18 43
19 62
20 42
21 63
22 41
23 18
24 44
25 19
26 45
27 72
28 100
29 71
30 101
31 70
32 38
33 5
34 39
35 4
36 40
37 77
38 115
39 76
40 36
41 78
42 120
43 163
44 119
45 74
46 28
47 75
48 27
49 79
50 29
51 80
52 132
53 185
54 131
55 186
56 130
57 73
58 15
59 81
60 141
61 202

List of values

[1, 3, 6, 2, 7, 13, 20, 12, 21, 11, 22, 10, 23, 9, 24, 8, 25, 43, 62, 42, 63, 41, 18, 44, 19, 45, 72, 100, 71, 101, 70, 38, 5, 39, 4, 40, 77, 115, 76, 36, 78, 120, 163, 119, 74, 28, 75, 27, 79, 29, 80, 132, 185, 131, 186, 130, 73, 15, 81, 141, 202]