A341579
Number of steps needed to solve the Towers of Hanoi exchanging disks puzzle with 3 pegs and n disks.
Original entry on oeis.org
0, 1, 3, 7, 13, 25, 47, 89, 165, 307, 569, 1057, 1959, 3633, 6733, 12483, 23137, 42889, 79495, 147353, 273125, 506259, 938377, 1739345, 3223975, 5975841, 11076573, 20531107, 38055633, 70538425, 130747207, 242347849, 449206325, 832631027, 1543331769, 2860658497
Offset: 0
As a graph where each vertex is a configuration of disks on pegs and each edge is a step (as drawn by Scorer et al.),
A
/ \
*---* n=3 disks
/ \ A to D
* * a(3) = 7 steps
/ \ / \
*---B---*---*
/ \
* / \ *
/ \ / \ / \
*---C *---*
/ \ / \
* *-------* *
/ \ / \ / \ / \
D---*---*---* *---*---*---*
The formula using A341580 is A to B distance A341580(2) = 3, the same (by symmetry) from D to C, and +1 from B to C. B to C is where the largest disk moves to the target peg (by exchange with the second-largest).
- Kevin Ryde, Table of n, a(n) for n = 0..700
- House of Graphs, graphs 44105, 44107, 44109. Diameters = a(3..5).
- R. S. Scorer, P. M. Grundy, and C. A. B. Smith, Some Binary Games, The Mathematical Gazette, July 1944, volume 28, number 280, pages 96-103, section 4(iii) Plane Network Game.
- Paul K. Stockmeyer, C. Douglass Bateman, James W. Clark, Cyrus R. Eyster, Matthew T. Harrison, Nicholas A. Loehr, Patrick J. Rodriguez, and Joseph R. Simmons III, Exchanging Disks in the Tower of Hanoi, International Journal of Computer Mathematics, volume 59, number 1-2, pages 37-47, 1995. Also author's copy. a(n) = f(n) in section 3.
- Index entries for linear recurrences with constant coefficients, signature (2,0,-1,2,-2).
- Index entries for sequences related to Towers of Hanoi
-
A341579list[nmax_]:=LinearRecurrence[{2,0,-1,2,-2},{0,1,3,7,13},nmax+1];A341579list[50] (* Paolo Xausa, Jun 29 2023 *)
-
my(p=Mod('x,'x^4-'x^3-'x^2-2)); a(n) = subst(lift(p^n),'x,2) - 1;
A341581
Number of steps needed to move the largest disk out from a stack of n disks in the Towers of Hanoi exchanging disks puzzle with 3 pegs.
Original entry on oeis.org
0, 1, 2, 5, 10, 20, 37, 70, 130, 243, 450, 836, 1549, 2874, 5326, 9875, 18302, 33928, 62885, 116566, 216058, 400483, 742314, 1375932, 2550365, 4727266, 8762262, 16241395, 30104390, 55800320, 103429237, 191712350, 355350370, 658663363, 1220872210, 2262960276
Offset: 0
As a graph where each vertex is a configuration of disks on pegs and each edge is a step (as drawn by Scorer et al.),
A
/ \
*---* n=3 disks
/ \ A to D
* * steps
/ \ / \ a(3) = 5
*---B---*---*
/ \
D / \ *
/ \ / \ / \
*---C *---*
/ \ / \
* *-------* *
/ \ / \ / \ / \
*---*---*---* *---*---*---*
The recurrence using A341579 and A341580 is steps A341580(2)=3 from A to B, +1 from B to C, and A341579(1) = 1 from C to D (the whole puzzle solution in an n-2 subgraph).
- Kevin Ryde, Table of n, a(n) for n = 0..700
- Paul K. Stockmeyer et al., Exchanging Disks in the Tower of Hanoi, International Journal of Computer Mathematics, volume 59, number 1-2, pages 37-47, 1995. Also author's copy. a(n) = h(n) in section 3.
- Index entries for linear recurrences with constant coefficients, signature (2,0,-1,2,-2).
- Index entries for sequences related to Towers of Hanoi
A341582
Number of simple moves of the smallest disk in the solution to the Towers of Hanoi exchanging disks puzzle with 3 pegs and n disks.
Original entry on oeis.org
0, 1, 2, 4, 6, 12, 22, 42, 76, 142, 262, 488, 902, 1674, 3100, 5750, 10654, 19752, 36606, 67858, 125772, 233134, 432118, 800968, 1484630, 2751866, 5100732, 9454534, 17524526, 32482792, 60208782, 111600642, 206858476, 383424702, 710700742, 1317326728, 2441744422
Offset: 0
As a graph where each vertex is a configuration of disks on pegs and each edge is a step (as drawn by Scorer et al.),
A
/ \ n=3 disks
B---* solution
/ \ A to H,
C * within
/ \ / \ which
*---D---*---* a(3) = 4
/ \ smallest
* / \ * disk moves:
/ \ / \ / \ AB, CD,
F---E *---* EF, GH
/ \ / \
G I-------* *
/ \ / \ / \ / \
H---*---*---J *---*---*---*
For n=4, the first half of the solution is A to J per A341580. The smallest disk moves are AB, CD, IJ, and twice those is a(4) = 2*3 = 6 since J across to the next subgraph is an exchange, not a smallest disk move.
- Kevin Ryde, Table of n, a(n) for n = 0..700
- Paul K. Stockmeyer et al., Exchanging Disks in the Tower of Hanoi, International Journal of Computer Mathematics, volume 59, number 1-2, pages 37-47, 1995. Also author's copy. See section 5 exercise 2.
- Index entries for linear recurrences with constant coefficients, signature (1,1,0,2).
- Index entries for sequences related to Towers of Hanoi
-
A341582list[nmax_]:=LinearRecurrence[{1,1,0,2},{0,1,2,4},nmax+1];A341582list[50] (* Paolo Xausa, Jun 29 2023 *)
-
my(p=Mod('x,'x^4-'x^3-'x^2-2)); a(n) = subst(lift(p^n)\'x,'x,2);
Showing 1-3 of 3 results.
Comments