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.

A241816 a(n) is the largest number smaller than n that can be obtained by swapping two adjacent bits in n, or n if no such number exists.

Table of values

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

List of values

[0, 1, 1, 3, 2, 3, 5, 7, 4, 5, 9, 7, 10, 11, 13, 15, 8, 9, 17, 11, 18, 19, 21, 15, 20, 21, 25, 23, 26, 27, 29, 31, 16, 17, 33, 19, 34, 35, 37, 23, 36, 37, 41, 39, 42, 43, 45, 31, 40, 41, 49, 43, 50, 51, 53, 47, 52, 53, 57, 55, 58, 59, 61, 63, 32, 33, 65, 35, 66, 67, 69]