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.
%I A330155 #31 Jan 06 2020 03:46:38 %S A330155 1,1,2,2,3,1,2,1,3,4,3,1,5,2,4,3,2,6,5,1,4,4,2,1,6,5,7,3,4,3,1,8,6,5, %T A330155 7,2,5,3,2,9,8,6,4,7,1,5,4,2,1,9,8,6,3,7,10,6,4,3,1,11,9,8,5,2,7,10,6, %U A330155 5,3,2,12,11,9,8,4,1,7,10,7,5,4,2,1,12,11,9,8,3,13,6,10 %N A330155 Triangle read by rows. Given n enumerated cards in a stack, with 1 at the top and n at the bottom, repeat the following process k times: remove the card in the middle (at position (size of the stack)/2, rounding up), and move the card at the bottom of the stack to the top. T(n,k) is the number of the last card removed. %F A330155 T(n,n) = A308432(n), n > 0. %F A330155 Conjecture: (Start) %F A330155 Each diagonal forms a unique sequence S. Let S(m) be the m-th diagonal in T, for example with m=2, S(2) = 1,3,3,2,1,7,...; then T(n,k) = k-th element in S(n-k+1). %F A330155 Let z = ceiling(m/2); the first z elements in S(m) are z,z-1,z-2,...,1. %F A330155 Let G(x) = 3*((x-2)/2)+2 if x even, %F A330155 3*((x-1)/2)+1 otherwise. %F A330155 Let B(x) = Sum_{i=0..x-1} 2*G(m)*3^i. %F A330155 Let C(x) = z if x=0, %F A330155 B(x)+z otherwise. %F A330155 C(x)-th element in S(m) is 1, for all x >= 0. %F A330155 Let D(x) = G(m)*3^(x-1), with x > 0. %F A330155 Let y = minimum x such that k <= C(x). %F A330155 Finally S(m) = z-k+1 if z >= k, %F A330155 D(y)+1 if C(y)-k >= D(y), %F A330155 C(y)-k+1 otherwise. %F A330155 for all k. %F A330155 Then T(n,k) = k-th element in S(n-k+1). %F A330155 (End) %e A330155 Triangle begins: %e A330155 1; %e A330155 1, 2; %e A330155 2, 3, 1; %e A330155 2, 1, 3, 4; %e A330155 3, 1, 5, 2, 4; %e A330155 3, 2, 6, 5, 1, 4; %e A330155 4, 2, 1, 6, 5, 7, 3; %e A330155 4, 3, 1, 8, 6, 5, 7, 2; %e A330155 5, 3, 2, 9, 8, 6, 4, 7, 1; %e A330155 5, 4, 2, 1, 9, 8, 6, 3, 7, 10; %e A330155 ... %e A330155 With n=5, row #5 is 3,1,5,2,4. In the diagram below, each "X" represents the removal of a card: %e A330155 . %e A330155 +-->4X %e A330155 | %e A330155 +-->2X | %e A330155 | | %e A330155 +-->4--+-->4--+ %e A330155 | | %e A330155 +-->5--+-->5X | %e A330155 | | | %e A330155 1--+-->1X | | %e A330155 | | | %e A330155 2--+-->2--+-->2--+ %e A330155 | | %e A330155 3X | | %e A330155 | | %e A330155 4--+-->4--+ %e A330155 | %e A330155 5--+ %Y A330155 This triangle is based on A308432. %K A330155 nonn,tabl %O A330155 1,3 %A A330155 _Wilmer Emiro Castrillon Calderon_, Dec 03 2019