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.

A308432 Given n cards in a stack numbered from 1 to n with 1 at the top, repeat the following process: first remove the card that is in the middle (at position (size of the stack)/2, rounding up), then move the card that is at the bottom of the stack to the top. This process is repeated until there is only one card left. a(n) is the number of the last remaining card.

Table of values

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

List of values

[1, 2, 1, 4, 4, 4, 3, 2, 1, 10, 10, 10, 10, 10, 10, 10, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12]