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.

A047988 Start with n and reach 2 by repeatedly either dividing by d where d <= the square root or by adding or subtracting 1. The division steps are free, but adding or subtracting 1 costs 1 point. a(n) is the smallest cost to reach 2.

Table of values

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

List of values

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