Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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. 0
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, 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, 5, 3, 2, 12, 11, 9, 8, 4, 1, 7, 10, 7, 5, 4, 2, 1, 12, 11, 9, 8, 3, 13, 6, 10 (list; table; graph; refs; listen; history; text; internal format)
OFFSET
1,3
LINKS
FORMULA
T(n,n) = A308432(n), n > 0.
Conjecture: (Start)
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).
Let z = ceiling(m/2); the first z elements in S(m) are z,z-1,z-2,...,1.
Let G(x) = 3*((x-2)/2)+2 if x even,
3*((x-1)/2)+1 otherwise.
Let B(x) = Sum_{i=0..x-1} 2*G(m)*3^i.
Let C(x) = z if x=0,
B(x)+z otherwise.
C(x)-th element in S(m) is 1, for all x >= 0.
Let D(x) = G(m)*3^(x-1), with x > 0.
Let y = minimum x such that k <= C(x).
Finally S(m) = z-k+1 if z >= k,
D(y)+1 if C(y)-k >= D(y),
C(y)-k+1 otherwise.
for all k.
Then T(n,k) = k-th element in S(n-k+1).
(End)
EXAMPLE
Triangle begins:
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, 7, 2;
5, 3, 2, 9, 8, 6, 4, 7, 1;
5, 4, 2, 1, 9, 8, 6, 3, 7, 10;
...
With n=5, row #5 is 3,1,5,2,4. In the diagram below, each "X" represents the removal of a card:
.
+-->4X
|
+-->2X |
| |
+-->4--+-->4--+
| |
+-->5--+-->5X |
| | |
1--+-->1X | |
| | |
2--+-->2--+-->2--+
| |
3X | |
| |
4--+-->4--+
|
5--+
CROSSREFS
This triangle is based on A308432.
Sequence in context: A051521 A319562 A171810 * A327759 A269978 A351258
KEYWORD
nonn,tabl
AUTHOR
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 27 17:12 EDT 2024. Contains 375471 sequences. (Running on oeis4.)