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.

A125731 a(n) = minimal number of steps to get from 1 to n, where a step is x -> 3x+1 if x is odd, or x -> either x/2 or 3x+1 if x is even. Set a(n) = -1 if n cannot be reached from 1.

Table of values

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

List of values

[0, 2, -1, 1, 6, -1, 3, 8, -1, 5, 5, -1, 2, 15, -1, 7, 7, -1, 12, 4, -1, 4, 9, -1, 9, 9, -1, 14, 14, -1, 6, 19, -1, 6, 11, -1, 11, 11, -1, 3, 29, -1, 16, 16, -1, 8, 8, -1, 8, 21, -1, 8, 13, -1, 26, 13, -1, 13, 13, -1, 5, 31, -1, 18, 18, -1, 5, 23, -1, 10]