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.

User: Uri Levy

Uri Levy's wiki page.

Uri Levy has authored 15 sequences. Here are the ten most recent ones:

A183122 Magnetic Tower of Hanoi, number of moves of disk number k, generated by a certain algorithm, yielding a "forward moving" non-optimal solution of the [NEUTRAL ; NEUTRAL ; NEUTRAL] pre-colored puzzle.

Original entry on oeis.org

0, 1, 3, 7, 19, 53, 153, 455, 1359, 4073, 12213, 36635, 109899, 329693, 989073, 2967215, 8901639, 26704913, 80114733, 240344195, 721032579, 2163097733, 6489293193, 19467879575, 58403638719, 175210916153, 525632748453, 1576898245355, 4730694736059
Offset: 0

Author

Uri Levy, Jan 07 2011

Keywords

Comments

A. The Magnetic Tower of Hanoi puzzle is described in link 1 listed below. The Magnetic Tower is pre-colored. Pre-coloring is [NEUTRAL ; NEUTRAL ; NEUTRAL], given in [Source ; Intermediate ; Destination] order. The solution algorithm producing the presented sequence is NOT optimal. The particular "62" algorithm solving the puzzle at hand is presented and discussed in the paper referenced by link 1 below. For the optimal solution of the Magnetic Tower of Hanoi puzzle with the given pre-coloring configuration (the "natural" or "free" Magnetic Tower) see A183117 and A183118. Optimal solutions are discussed and their optimality is proved in link 2 listed below.
B. Disk numbering is from largest disk (k = 1) to smallest disk (k = N)
C. The above-listed "original" sequence generates a "partial-sums" sequence - describing the total number of moves required to solve the puzzle.
D. Number of moves of disk k, for large k, is close to (67/108)*3^(k-1) ~ 0.62*3^(k-1). Series designation: P62(k).

References

  • U. Levy, The Magnetic Tower of Hanoi, Journal of Recreational Mathematics, Volume 35 Number 3 (2006), 2010, pp 173.

Crossrefs

A000244 "Powers of 3" is the sequence (also) describing the number of moves of the k-th disk solving [RED ; BLUE ; BLUE] or [RED ; RED ; BLUE] pre-colored Magnetic Tower of Hanoi puzzle. A183111 through A183125 are related sequences, all associated with various solutions of the pre-coloring variations of the Magnetic Tower of Hanoi.

Programs

  • Mathematica
    Join[{0,1,3,7},LinearRecurrence[{3,1,-3},{19,53,153},30]] (* Harvey P. Dale, Dec 08 2014 *)

Formula

a(n)=+3*a(n-1)+a(n-2)-3*a(n-3) for n>6.
g.f.: x+ 3*x^2 +7*x^3 -x^4*(-19+4*x+25*x^2)/ ((x-1)(3*x-1)(1+x)).
(a(n) = P62(n) as in referenced paper):
a(n) = 3*a(n-1) - 6; n even; n >= 6
a(n) = 3*a(n-1) - 4; n odd; n >= 5
a(n) = P67(n-1) + P67(n-2) + P75(n-3) + 8*3^(n-4) ; n >= 4
P75(n) and P67(n) refer to the integer sequences described by A122983 and A100702 respectively. See also A183119.
a(n) = (67/108)*3^(n-1) + 9/4; n even; n >= 4
a(n) = (67/108)*3^(n-1) + 11/4; n odd; n >= 5

Extensions

More terms from Harvey P. Dale, Dec 08 2014

A183117 Magnetic Tower of Hanoi, number of moves of disk number k, optimally solving the [NEUTRAL ; NEUTRAL ; NEUTRAL] pre-colored puzzle.

Original entry on oeis.org

0, 1, 3, 7, 19, 53, 153, 451, 1339, 3997, 11961, 35835, 107435, 322197, 966425, 2899027, 8696699, 26089517, 78267673, 234801675, 704402987, 2113205861, 6339612857, 19018831395, 57056483259, 171169433149, 513508274169, 1540524784027, 4621574293547, 13864722791605, 41594168239321
Offset: 0

Author

Uri Levy, Dec 31 2010

Keywords

Comments

The Magnetic Tower of Hanoi puzzle is described in link 1 listed below. The Magnetic Tower is pre-colored. Pre-coloring is [NEUTRAL ; NEUTRAL ; NEUTRAL], given in [Source ; Intermediate ; Destination] order. Thus, the tower in this case is "natural" or "free". The solution algorithm producing the sequence is optimal (the sequence presented gives the minimum number of moves to solve the puzzle for the given pre-coloring configuration). Optimal solutions are discussed and their optimality is proved in link 2 listed below.
Disk numbering is from largest disk (k = 1) to smallest disk (k = N).
The above-listed "original" sequence generates a "partial-sums" sequence - describing the total number of moves required to solve the puzzle.
Number of moves of disk k, for large k, is close to (20/33)*3^(k-1) ~ 0.606*3^(k-1). Series designation: P606(k).

References

  • Uri Levy, The Magnetic Tower of Hanoi, Journal of Recreational Mathematics, Volume 35 Number 3 (2006), 2010, pp. 173.

Crossrefs

A000244 "Powers of 3" is the sequence (also) describing the number of moves of the k-th disk solving [RED ; BLUE ; BLUE] or [RED ; RED ; BLUE] pre-colored Magnetic Tower of Hanoi puzzle.
A183111 through A183125 are related sequences, all associated with various solutions of the pre-coloring variations of the Magnetic Tower of Hanoi.

Programs

  • Mathematica
    L1 = Root[-2 - # + #^3&, 1];
    L2 = Root[-2 - # + #^3&, 3];
    L3 = Root[-2 - # + #^3&, 2];
    AP = Root[-2 - 9# - 52 #^2 + 572 #^3&, 1];
    BP = Root[-2 - 9# - 52 #^2 + 572 #^3&, 3];
    CP = Root[-2 - 9# - 52 #^2 + 572 #^3&, 2];
    a[0] = 0;
    a[n_] := (1/2) AP (L1+1)^2 L1^(n-1) + (1/2) BP (L2+1)^2 L2^(n-1) + (1/2) CP (L3+1)^2 L3^(n-1) + (20 3^(n-1))/33;
    Table[a[n] // Round, {n, 0, 30}] (* Jean-François Alcover, Dec 03 2018 *)

Formula

G.f. appears to be -x*(1+x)*(2*x^3+2*x^2+x-1)/((3*x-1)*(2*x^3+x^2-1)) with a(n) = 3*a(n-1) + a(n-2) - a(n-3) - 6*a(n-4) for n > 5. - Joerg Arndt, Jan 03 2011
Recurrence Relations (a(n)=P606(n) as in referenced paper):
P606(n) = P636(n-1) + P636(n-2) + P909(n-2) + 2*3^(n-3) ; n >= 3.
Note: P636(n) and P909(n) refer to the integer sequences described by A183115 and A183111 respectively.
Closed-Form Expression:
Define:
λ1 = (1+sqrt(26/27))^(1/3) + (1-sqrt(26/27))^(1/3)
λ2 = -0.5*λ1 + 0.5*i*((sqrt(27) + sqrt(26))^(1/3) - (sqrt(27) - sqrt(26))^(1/3))
λ3 = -0.5*λ1 - 0.5*i*((sqrt(27) + sqrt(26))^(1/3) - (sqrt(27) - sqrt(26))^(1/3))
AP = ((1/11)*λ2*λ3 - (3/11)*(λ2 + λ3) + (9/11))/((λ2 - λ1)*(λ3 - λ1))
BP = ((1/11)*λ1*λ3 - (3/11)*(λ1 + λ3) + (9/11))/((λ1 - λ2)*(λ3 - λ2))
CP = ((1/11)*λ1*λ2 - (3/11)*(λ1 + λ2) + (9/11))/((λ2 - λ3)*(λ1 - λ3))
For n > 1:
P606(n) = (20/33)*3^(n-1) + 0.5*AP*((λ1+1)^2)*λ1^(n-1) + 0.5*BP*((λ2+1)^2)*λ2^(n-1) + 0.5*CP*(λ3+1)^2)*λ3^(n-1).

A183118 Magnetic Tower of Hanoi, total number of moves, optimally solving the [NEUTRAL ; NEUTRAL ; NEUTRAL] pre-colored puzzle.

Original entry on oeis.org

0, 1, 4, 11, 30, 83, 236, 687, 2026, 6023, 17984, 53819, 161254, 483451, 1449876, 4348903, 13045602, 39135119, 117402792, 352204467, 1056607454
Offset: 0

Author

Uri Levy, Jan 01 2011

Keywords

Comments

A. The Magnetic Tower of Hanoi puzzle is described in link 1 listed below. The Magnetic Tower is pre-colored. Pre-coloring is [NEUTRAL ; NEUTRAL ; NEUTRAL], given in [Source ; Intermediate ; Destination] order. Thus, the tower in this case is "natural" or "free". The solution algorithm producing the sequence is optimal (the sequence presented gives the minimum number of moves to solve the "free" Magnetic Tower of Hanoi puzzle). Optimal solutions are discussed and their optimality is proved in link 2 listed below.
B. Number of moves to solve the given puzzle, for large N, is close to 0.5*(20/33)*3^N ~ 0.5*0.606*3^(N). Series designation: S606(N).
C. The large N ratio of number of moves to solve the [NEUTRAL ; NEUTRAL ; NEUTRAL] puzzle to the number of moves to solve the [RED ; BLUE ; BLUE] or [RED ; RED ; BLUE] puzzle is 20/33 or about 60.6% (see link 2).

References

  • "The Magnetic Tower of Hanoi", Uri Levy, Journal of Recreational Mathematics, Volume 35 Number 3 (2006), 2010, pp 173.

Crossrefs

A183117 is an "original" sequence describing the number of moves of disk number k, optimally solving the pre-colored puzzle at hand. The integer sequence listed above is the partial sums of the A183117 original sequence.
A003462 "Partial sums of A000244" is the sequence (also) describing the total number of moves solving [RED ; BLUE ; BLUE] or [RED ; RED ; BLUE] pre-colored Magnetic Tower of Hanoi puzzle.
A183111 through A183125 are related sequences, all associated with various solutions of the pre-coloring variations of the Magnetic Tower of Hanoi.

Programs

  • Mathematica
    Join[{0}, LinearRecurrence[{4, -2, -2, -5, 6}, {1, 4, 11, 30, 83}, 20]] (* Jean-François Alcover, Jan 28 2019 *)

Formula

G.f. x*(-2*x^4-4*x^3-3*x^2+1)/(-6*x^5+5*x^4+2*x^3+2*x^2-4*x+1).
Recurrence Relations (a(n)=S606(n) as in referenced paper):
S606(n) = S636(n-1)+ S636(n-2)+ S909(n-2)+ 3^(n-2)+ 2; n >= 2; S909(0) = 0; S636(0) = 0
Note: S636(n) and S909(n) are sequences A183116 and A183112 respectively.
Closed-Form Expression: Let
λ1 = [1+sqrt(26/27)]^(1/3) + [1-sqrt(26/27)]^(1/3)
λ2 = -0.5*λ1 + 0.5*i*{[sqrt(27)+sqrt(26)]^(1/3)- [sqrt(27)-sqrt(26)]^(1/3)}
λ3 = -0.5*λ1 - 0.5*i*{[sqrt(27)+sqrt(26)]^(1/3)- [sqrt(27)-sqrt(26)]^(1/3)}
AS = [(7/11)* λ2* λ3 - (10/11)*(λ2 + λ3) + (19/11)]/[(λ2 - λ1)*( λ3 - λ1)]
BS = [(7/11)* λ1* λ3 - (10/11)*(λ1 + λ3) + (19/11)]/[(λ1 - λ2)*( λ3 - λ2)]
CS = [(7/11)* λ1* λ2 - (10/11)*(λ1 + λ2) + (19/11)]/[(λ2 - λ3)*( λ1 - λ3)]
Then, for n > 0:
S606(n) = (10/33)*3^n + 0.5*AS*[(λ1 + 1)^2]*λ1^(n-1) + 0.5*BS*[(λ2 + 1)^2]*λ2^(n-1) + 0.5*CS*[(λ3 + 1)^2]*λ3^(n-1) - 2

A183116 Magnetic Tower of Hanoi, total number of moves, optimally solving the [RED ; NEUTRAL ; NEUTRAL] or [NEUTRAL ; NEUTRAL ; BLUE] pre-colored puzzle.

Original entry on oeis.org

0, 1, 4, 11, 30, 85, 244, 715, 2118, 6309, 18860, 56475, 169262, 507541, 1522244, 4566155, 13697590, 41091429, 123272252, 369813659, 1109436254
Offset: 0

Author

Uri Levy, Dec 31 2010

Keywords

Comments

The Magnetic Tower of Hanoi puzzle is described in link 1 listed below. The Magnetic Tower is pre-colored. Pre-coloring is [RED ; NEUTRAL ; NEUTRAL] or [NEUTRAL ; NEUTRAL ; BLUE], given in [Source ; Intermediate ; Destination] order. The solution algorithm producing the sequence is optimal (the sequence presented gives the minimum number of moves to solve the puzzle for the given pre-coloring configurations). Optimal solutions are discussed and their optimality is proved in link 2 listed below.
Number of moves to solve the given puzzle, for large N, is close to 0.5*(7/11)*3^N ~ 0.5*0.636*3^(N). Series designation: S636(N).

References

  • "The Magnetic Tower of Hanoi", Uri Levy, Journal of Recreational Mathematics, Volume 35 Number 3 (2006), 2010, pp 173.

Crossrefs

A183115 is an "original" sequence describing the number of moves of disk number k, optimally solving the pre-colored puzzle at hand. The integer sequence listed above is the partial sums of the A183115 original sequence.
A003462 "Partial sums of A000244" is the sequence (also) describing the total number of moves solving [RED ; BLUE ; BLUE] or [RED ; RED ; BLUE] pre-colored Magnetic Tower of Hanoi puzzle.
A183111 through A183125 are related sequences, all associated with various solutions of the pre-coloring variations of the Magnetic Tower of Hanoi.

Programs

  • Mathematica
    L1 = Root[-2 - # + #^3&, 1];
    L2 = Root[-2 - # + #^3&, 3];
    L3 = Root[-2 - # + #^3&, 2];
    AP = Root[-2 - 9 # - 52 #^2 + 572 #^3&, 1];
    BP = Root[-2 - 9 # - 52 #^2 + 572 #^3&, 3];
    CP = Root[-2 - 9 # - 52 #^2 + 572 #^3&, 2];
    (* b = A183115 *) b[0] = 0; b[n_] := (7/11) 3^(n-1) + AP (L1+1) L1^(n-1) + BP (L2+1) L2^(n-1) + CP (L3+1) L3^(n-1) // Round;
    Array[b, 21, 0] // Accumulate (* Jean-François Alcover, Jan 30 2019 *)

Formula

G.f. appears to be (-4*x^3-3*x^2+1)/(-6*x^5+5*x^4+2*x^3+2*x^2-4*x+1).
Recurrence Relations (a(n)=S636(n) as in referenced paper):
S636(n) = S636(n-1) + 2*S909(n-2) + 3^(n-2) + 2 ; n >= 2 ; S909(0) = 0
Note: S909(n-2) refers to the integer sequence described by A183112.
Closed-Form Expression:
Define:
λ1 = [1+sqrt(26/27)]^(1/3) + [1-sqrt(26/27)]^(1/3)
λ2 = -0.5* λ1 + 0.5*i*{[sqrt(27)+sqrt(26)]^(1/3)- [sqrt(27)-sqrt(26)]^(1/3)}
λ3 = -0.5* λ1 - 0.5*i*{[sqrt(27)+sqrt(26)]^(1/3)- [sqrt(27)-sqrt(26)]^(1/3)}
AS = [(7/11)* λ2* λ3 - (10/11)*(λ2 + λ3) + (19/11)]/[( λ2 - λ1)*( λ3 - λ1)]
BS = [(7/11)* λ1* λ3 - (10/11)*(λ1 + λ3) + (19/11)]/[( λ1 - λ2)*( λ3 - λ2)]
CS = [(7/11)* λ1* λ2 - (10/11)*(λ1 + λ2) + (19/11)]/[( λ2 - λ3)*( λ1 - λ3)]
For n > 0:
S636(n) = (7/22)*3^n + AS*(λ1 + 1)*λ1^(n-1) + BS*(λ2 + 1)*λ2^(n-1) + CS*(λ3 + 1)*λ3^(n-1) - (3/2)

A183111 Magnetic Tower of Hanoi, number of moves of disk number k, optimally solving the [RED ; BLUE ; NEUTRAL] or [NEUTRAL ; RED ; BLUE] pre-colored puzzle.

Original entry on oeis.org

0, 1, 3, 9, 25, 75, 223, 665, 1993, 5971, 17903, 53697, 161065, 483163, 1449439, 4348233, 13044585, 39133571, 117400431, 352200881, 1056601993, 3169805003, 9509413535, 28528238329, 85584711561, 256754129459, 770262380399, 2310787129121, 6932361368937
Offset: 0

Author

Uri Levy, Dec 25 2010

Keywords

Comments

A. The Magnetic Tower of Hanoi puzzle is described in link 1 listed below. The Magnetic Tower is pre-colored. Pre-coloring is [RED ; BLUE ; NEUTRAL] or [NEUTRAL ; RED ; BLUE], given in [Source ; Intermediate ; Destination] order. The solution algorithm producing the sequence is optimal (the sequence presented gives the minimum number of moves to solve the puzzle for the given pre-coloring configurations). Optimal solutions are discussed and their optimality is proved in link 2 listed below.
B. Disk numbering is from largest disk (k = 1) to smallest disk (k = N)
C. The above-listed "original" sequence generates a "partial-sums" sequence - describing the total number of moves required to solve the puzzle.
D. The number of moves of disk k, for large k, is close to (10/11)*3^(k-1) ~ 0.909*3^(k-1). Series designation: P909(k).

Crossrefs

A000244 "Powers of 3" is the sequence (also) describing the number of moves of the k-th disk solving [RED ; BLUE ; BLUE] or [RED ; RED ; BLUE] pre-colored Magnetic Tower of Hanoi.

Programs

  • Mathematica
    LinearRecurrence[{3,1,-1,-6},{0,1,3,9,25},30] (* Harvey P. Dale, Apr 30 2018 *)

Formula

G.f.: -x*(-1+4*x^3+x^2) / ( (3*x-1)*(2*x^3+x^2-1) ).
Recurrence Relations (a(n)=P909(n) as in referenced paper):
a(n) = a(n-2) + a(n-3) + 2*3^(n-2) + 2*3^(n-4) ; n >= 4
Closed-Form Expression:
Define:
λ1 = [1+sqrt(26/27)]^(1/3) + [1-sqrt(26/27)]^(1/3)
λ2 = -0.5* λ1 + 0.5*i*{[sqrt(27)+sqrt(26)]^(1/3)- [sqrt(27)-sqrt(26)]^(1/3)}
λ3 = -0.5* λ1 - 0.5*i*{[sqrt(27)+sqrt(26)]^(1/3)- [sqrt(27)-sqrt(26)]^(1/3)}
AP = [(1/11)* λ2* λ3 - (3/11)*(λ2 + λ3) + (9/11)]/[( λ2 - λ1)*( λ3 - λ1)]
BP = [(1/11)* λ1* λ3 - (3/11)*(λ1 + λ3) + (9/11)]/[( λ1 - λ2)*( λ3 - λ2)]
CP = [(1/11)* λ1* λ2 - (3/11)*(λ1 + λ2) + (9/11)]/[( λ2 - λ3)*( λ1 - λ3)]
For any n > 0:
a(n) = (10/11)*3^(n-1) + AP* λ1^(n-1) + BP* λ2^(n-1) + CP* λ3^(n-1)
33*a(n) = 10*3^n -3*( A052947(n-2) -A052947(n-1) -4*A052947(n) ). - R. J. Mathar, Feb 05 2020

Extensions

More terms from Harvey P. Dale, Apr 30 2018

A183114 Magnetic Tower of Hanoi, total number of moves, optimally solving the [RED ; NEUTRAL ; BLUE] pre-colored puzzle.

Original entry on oeis.org

0, 1, 4, 11, 32, 93, 272, 807, 2404, 7185, 21516, 64483, 193352, 579909, 1739496, 5218143, 15653900, 46960889, 140881444, 422642459, 1267924528, 3803769261, 11411301184, 34233893527, 102701665332, 308104972769, 924314883004, 2772944595283, 8318833704088, 24956500987925
Offset: 0

Author

Uri Levy, Dec 29 2010

Keywords

Comments

The Magnetic Tower of Hanoi puzzle is described in link 1 listed below. The Magnetic Tower is pre-colored. Pre-coloring is [RED ; NEUTRAL ; BLUE], given in [Source ; Intermediate ; Destination] order. The solution algorithm producing the sequence is optimal (the sequence presented gives the minimum number of moves to solve the puzzle for the given pre-coloring configuration). Optimal solutions are discussed and their optimality is proved in link 2 listed below.
Number of moves to solve the given puzzle, for large N, is close to 0.5*(8/11)*3^N ~ 0.5*0.727*3^(N). Series designation: S727(N).

References

  • U. Levy, The Magnetic Tower of Hanoi, Journal of Recreational Mathematics, Volume 35 Number 3 (2006), 2010, pp 173.

Crossrefs

A183113 is an "original" sequence describing the number of moves of disk number k, optimally solving the pre-colored puzzle at hand. The integer sequence listed above is the partial sums of the A183113 original sequence.
A003462 "Partial sums of A000244" is the sequence (also) describing the total number of moves solving [RED ; BLUE ; BLUE] or [RED ; RED ; BLUE] pre-colored Magnetic Tower of Hanoi puzzle.

Programs

  • Magma
    I:=[0,1,4,11,32]; [n le 5 select I[n] else 4*Self(n-1)-2*Self(n-2)-2*Self(n-3)-5*Self(n-4)+6*Self(n-5): n in [1..30]]; // Vincenzo Librandi, Dec 04 2018
  • Maple
    seq(coeff(series(x*(2*x-1)*(1+x)^2/((x-1)*(3*x-1)*(2*x^3+x^2-1)),x,n+1), x, n), n = 0 .. 35); # Muniru A Asiru, Dec 04 2018
  • Mathematica
    LinearRecurrence[{4, -2, -2, -5, 6}, {0, 1, 4, 11, 32}, 30] (* Jean-François Alcover, Dec 04 2018 *)
    CoefficientList[Series[x (2 x - 1) (1 + x)^2 / ((x - 1) (3 x - 1) (2 x^3 + x^2 - 1)), {x, 0, 33}], x] (* Vincenzo Librandi, Dec 04 2018 *)

Formula

G.f.: x*(2*x-1)*(1+x)^2 / ( (x-1)*(3*x-1)*(2*x^3+x^2-1) ).
Recurrence Relations (a(n)=S727(n) as in referenced paper):
a(N) = a(N-2) + 2*a(N-3) + 8*3^(N-3) + 2 ; N ≥ 3 ; S727(0) = 0
Closed-Form Expression:
Define:
λ1 = [1+sqrt(26/27)]^(1/3) + [1-sqrt(26/27)]^(1/3)
λ2 = -0.5* λ1 + 0.5*i*{[sqrt(27)+sqrt(26)]^(1/3)- [sqrt(27)-sqrt(26)]^(1/3)}
λ3 = -0.5* λ1 - 0.5*i*{[sqrt(27)+sqrt(26)]^(1/3)- [sqrt(27)-sqrt(26)]^(1/3)}
AS = [(7/11)* λ2* λ3 - (10/11)*(λ2 + λ3) + (19/11)]/[( λ2 - λ1)*( λ3 - λ1)]
BS = [(7/11)* λ1* λ3 - (10/11)*(λ1 + λ3) + (19/11)]/[( λ1 - λ2)*( λ3 - λ2)]
CS = [(7/11)* λ1* λ2 - (10/11)*(λ1 + λ2) + (19/11)]/[( λ2 - λ3)*( λ1 - λ3)]
For any N > 0:
a(N) = (4/11)*3^N + AS* λ1^N + BS* λ2^N + CS* λ3^N - 1
a(n) = 4*a(n-1)-2*a(n-2)-2*a(n-3)-5*a(n-4)+6*a(n-5). - Vincenzo Librandi, Dec 04 2018

Extensions

More terms from Jean-François Alcover, Dec 04 2018

A183119 Magnetic Tower of Hanoi, total number of moves generated by a certain algorithm, yielding a "forward moving" non-optimal solution of the [RED ; NEUTRAL ; BLUE] pre-colored puzzle.

Original entry on oeis.org

0, 1, 4, 11, 32, 93, 276, 823, 2464, 7385, 22148, 66435, 199296, 597877, 1793620, 5380847, 16142528, 48427569, 145282692, 435848059, 1307544160, 3922632461, 11767897364, 35303692071, 105911076192, 317733228553, 953199685636, 2859599056883, 8578797170624, 25736391511845
Offset: 0

Author

Uri Levy, Jan 03 2011

Keywords

Comments

The Magnetic Tower of Hanoi puzzle is described in link 1 listed below. The Magnetic Tower is pre-colored. Pre-coloring is [RED ; NEUTRAL ; BLUE], given in [Source ; Intermediate ; Destination] order. The solution algorithm producing the presented sequence is NOT optimal. The particular "75" algorithm solving the puzzle at hand is presented in a paper referenced by link 1 listed below. For the optimal solution of the Magnetic Tower of Hanoi puzzle with the given pre-coloring configuration see A183113 and A183114. Optimal solutions are discussed and their optimality is proved in link 2 listed below.
Large N limit of the sequence is 0.5*(3/4)*3^N = 0.5*0.75*3^N. Series designation: S75(n).

References

  • Uri Levy, The Magnetic Tower of Hanoi, Journal of Recreational Mathematics, Volume 35 Number 3 (2006), 2010, pp 173.

Crossrefs

A122983 - "Binomial transform of aeration of A081294" is an "original" sequence (also) describing the number of moves of disk number k, solving the pre-colored puzzle at hand when executing the "75" algorithm mentioned above and presented in the paper referenced by link 1 above. The integer sequence listed above is the partial sums of the A122983 original sequence.
A003462 "Partial sums of A000244" is the sequence (also) describing the total number of moves solving [RED ; BLUE ; BLUE] or [RED ; RED ; BLUE] pre-colored Magnetic Tower of Hanoi puzzle.

Programs

  • Magma
    [3^(n+1)/8+(n-1)/2+(-1)^n/8: n in [0..30]]; // Vincenzo Librandi, Dec 04 2018
  • Maple
    seq(coeff(series(x*(3*x^2-1)/((1+x)*(3*x-1)*(x-1)^2),x,n+1), x, n), n = 0 .. 30); # Muniru A Asiru, Dec 04 2018
  • Mathematica
    LinearRecurrence[{4, -2, -4, 3}, {0, 1, 4, 11}, 30] (* Jean-François Alcover, Dec 04 2018 *)
    Table[3^(n + 1) / 8 + (n - 1) / 2 + (-1)^n / 8, {n, 0, 30}] (* Vincenzo Librandi, Dec 04 2018 *)
  • PARI
    a(n) = 3^(n+1)/8 + (n-1)/2 + (-1)^n/8 \\ Charles R Greathouse IV, Jun 11 2015
    

Formula

G.f.: x*(-1+3*x^2) / ( (1+x)*(3*x-1)*(x-1)^2 ).
(a(n)=S75(n) in referenced paper):
a(n) = 3*a(n-1) - n + 3; n even; n >= 2
a(n) = 3*a(n-1) - n + 2; n odd; n >= 1
a(n) = a(n-2) + 3^(n-1) + 1; n >= 2
a(n) = 3^(n+1)/8 + (n-1)/2 +(-1)^n/8.

Extensions

More terms from Jean-François Alcover, Dec 04 2018

A183121 Magnetic Tower of Hanoi, total number of moves, generated by a certain algorithm, yielding a "forward moving" non-optimal solution of the [RED ; NEUTRAL ; NEUTRAL] or [NEUTRAL ; NEUTRAL ; BLUE] pre-colored puzzle.

Original entry on oeis.org

0, 1, 4, 11, 30, 85, 244, 715, 2118, 6317, 18900, 56635, 169822, 509365, 1527972, 4583771, 13751142, 41253229, 123759460, 371278123, 1113834078, 3341501909, 10024505364, 30073515691, 90220546630, 270661639405, 811984917684, 2435954752475, 7307864256798, 21923592769717, 65770778308420, 197312334924475
Offset: 0

Author

Uri Levy, Jan 05 2011

Keywords

Comments

The Magnetic Tower of Hanoi puzzle is described in link 1 listed below. The Magnetic Tower is pre-colored. Pre-coloring is [RED ; NEUTRAL ; NEUTRAL] or [NEUTRAL ; NEUTRAL ; BLUE], given in [Source ; Intermediate ; Destination] order. The solution algorithm producing the presented sequence is NOT optimal. The particular "64" algorithm solving the puzzle at hand is not explicitly presented in any of the referenced papers. The series and its properties are listed in the paper referenced by link 2 listed below. For the optimal solution of the Magnetic Tower of Hanoi puzzle with the given pre-coloring configuration see A183115 and A183116. Optimal solutions are discussed and their optimality is proved in link 2 listed below.
Large N limit of the sequence is 0.5*(23/36)*3^N =~ 0.5*0.64*3^N. Series designation: S64(n).

References

  • U. Levy, The Magnetic Tower of Hanoi, Journal of Recreational Mathematics, Volume 35 Number 3 (2006), 2010, pp 173.

Crossrefs

A183120 - is an "original" sequence describing the number of moves of disk number k, solving the pre-colored puzzle at hand when executing the "64" algorithm mentioned above.
A104743 - is a sequence also describing the total number of moves, generated by another algorithm, designated "67", yielding a "forward moving" non-optimal solution of the [RED ; NEUTRAL ; NEUTRAL] or [NEUTRAL ; NEUTRAL ; BLUE] pre-colored puzzle at hand. Recurrence relations for this sequence is a(n) = a(n-1) + 2*3^(n-2) + 1 and the closed-form expression is 3^(n-1) + n - 1. Large N limit is 0.5*(2/3)*3^N =~ 0.5*0.67*3^N, and sequence designation is thus S67(n). The (non-optimal) "67" algorithm solving the Magnetic Tower of Hanoi with the given pre-coloring configuration yielding the S67(n) sequence (given by A104743) is explicitly described and discussed in the paper referenced in link 1 above.
A003462 "Partial sums of A000244" is the sequence (also) describing the total number of moves solving [RED ; BLUE ; BLUE] or [RED ; RED ; BLUE] pre-colored Magnetic Tower of Hanoi puzzle.

Programs

  • Magma
    I:=[0,1,4,11,30,85,244]; [n le 7 select I[n] else 5*Self(n-1)-6*Self(n-2)-2*Self(n-3)+7*Self(n-4)-3*Self(n-5): n in [1..35]]; // Vincenzo Librandi, Dec 04 2018
    
  • Maple
    seq(coeff(series(x*(1-x-3*x^2+x^3+2*x^4-4*x^5)/((1+x)*(1-3*x)*(1-x)^3)), x,n+1), x, n), n = 0 .. 35); # Muniru A Asiru, Dec 04 2018
  • Mathematica
    Join[{0, 1}, LinearRecurrence[{5, -6, -2, 7, -3}, {4, 11, 30, 85, 244}, 30]] (* Jean-François Alcover, Dec 04 2018 *)
    CoefficientList[Series[x*(1-x-3*x^2+x^3+2*x^4-4*x^5)/((1+x)*(1-3*x)*(1-x)^3), {x, 0, 33}], x] (* Vincenzo Librandi, Dec 04 2018 *)
  • PARI
    my(x='x+O('x^30)); concat([0], Vec(x*(1-x-3*x^2+x^3+2*x^4-4*x^5)/ ((1+x)*(1-3*x)*(1-x)^3))) \\ G. C. Greubel, Dec 04 2018
    
  • Sage
    s=(x*(1-x-3*x^2+x^3+2*x^4-4*x^5)/((1+x)*(1-3*x)*(1-x)^3) ).series(x, 30); s.coefficients(x, sparse=False) # G. C. Greubel, Dec 04 2018

Formula

G.f.: x*(1-x-3*x^2+x^3+2*x^4-4*x^5)/((1+x)*(1-3*x)*(1-x)^3).
(a(n) = S64(n) as in referenced paper):
a(n) = 3*a(n-1) - n^2 + 6*n - 11; n even; n >= 4.
a(n) = 3*a(n-1) - n^2 + 6*n - 10; n odd; n >= 3.
a(n) = a(n-1) + 2* S75(n-3) + 5*3^(n-3) + 2; n >= 3
S75(n) refers to the integer sequence described by A183119.
a(n) = 0.5*(23/36)*3^n + 0.5*n^2 - 1.5*n + 17/8; n even; n >= 2.
a(n) = 0.5*(23/36)*3^n + 0.5*n^2 - 1.5*n + 19/8; n odd; n >= 3.
a(n) = 5*a(n-1)-6*a(n-2)-2*a(n-3)+7*a(n-4)-3*a(n-5), for n>5. - Vincenzo Librandi, Dec 04 2018

Extensions

More terms from Jean-François Alcover, Dec 04 2018

A183112 Magnetic Tower of Hanoi, total number of moves, optimally solving the [RED ; BLUE ; NEUTRAL] or [NEUTRAL ; RED ; BLUE] pre-colored puzzle.

Original entry on oeis.org

0, 1, 4, 13, 38, 113, 336, 1001, 2994, 8965, 26868, 80565, 241630, 724793, 2174232, 6522465, 19567050, 58700621, 176101052, 528301933, 1584903926, 4754708929, 14264122464, 42792360793, 128377072354, 385131201813, 1155393582212, 3466180711333, 10398542080270
Offset: 0

Author

Uri Levy, Dec 25 2010

Keywords

Comments

The Magnetic Tower of Hanoi puzzle is described in link 1 listed below. The Magnetic Tower is pre-colored. Pre-coloring is [RED ; BLUE ; NEUTRAL] or [NEUTRAL ; RED ; BLUE], given in [Source ; Intermediate ; Destination] order. The solution algorithm producing the sequence is optimal (the sequence presented gives the minimum number of moves to solve the puzzle for the given pre-coloring configurations). Optimal solutions are discussed and their optimality is proved in link 2 listed below.
Number of moves to solve the given puzzle, for large N, is close to 0.5*(10/11)*3^N ~ 0.5*0.909*3^(N). Series designation: S909(N).

References

  • Uri Levy, "The Magnetic Tower of Hanoi", Journal of Recreational Mathematics, Volume 35 Number 3 (2006), 2010, pp 173.

Crossrefs

A183111 is an "original" sequence describing the number of moves of disk number k, optimally solving the pre-colored puzzle at hand. The integer sequence listed above is the partial sums of the A183111 original sequence.
A003462 "Partial sums of A000244" is the sequence (also) describing the total number of moves solving [RED ; BLUE ; BLUE] or [RED ; RED ; BLUE] pre-colored Magnetic Tower of Hanoi puzzle.

Programs

  • Mathematica
    LinearRecurrence[{4, -2, -2, -5, 6}, {0, 1, 4, 13, 38}, 21] (* Jean-François Alcover, Dec 14 2018 *)

Formula

Recurrence Relations (a(n)=S909(n) as in the referenced papers):
a(n) = a(n-2) + a(n-3) + 3^(n-1) + 3^(n-3) + 2; n >= 3 ; a(0) = 0
Closed-Form Expression:
Define:
λ1 = [1+sqrt(26/27)]^(1/3) + [1-sqrt(26/27)]^(1/3)
λ2 = -0.5* λ1 + 0.5*i*{[sqrt(27)+sqrt(26)]^(1/3)- [sqrt(27)-sqrt(26)]^(1/3)}
λ3 = -0.5* λ1 - 0.5*i*{[sqrt(27)+sqrt(26)]^(1/3)- [sqrt(27)-sqrt(26)]^(1/3)}
AS = [(7/11)* λ2* λ3 - (10/11)*(λ2 + λ3) + (19/11)]/[( λ2 - λ1)*( λ3 - λ1)]
BS = [(7/11)* λ1* λ3 - (10/11)*(λ1 + λ3) + (19/11)]/[( λ1 - λ2)*( λ3 - λ2)]
CS = [(7/11)* λ1* λ2 - (10/11)*(λ1 + λ2) + (19/11)]/[( λ2 - λ3)*( λ1 - λ3)]
For any n > 0:
a(n) = (5/11)*3^n + AS* λ1^(n-1) + BS* λ2^(n-1) + CS* λ3^(n-1) - 1.
G.f.: x*(1-x^2-4*x^3)/((1-x)*(1-3*x)*(1-x^2-2*x^3)); a(n)=4*a(n-1)-2*a(n-2)-2*a(n-3)-5*a(n-4)+6*a(n-5) with n>5. - Bruno Berselli, Dec 29 2010

A183113 Magnetic Tower of Hanoi, number of moves of disk number k, optimally solving the [RED ; NEUTRAL ; BLUE] pre-colored puzzle.

Original entry on oeis.org

0, 1, 3, 7, 21, 61, 179, 535, 1597, 4781, 14331, 42967, 128869, 386557, 1159587, 3478647, 10435757, 31306989, 93920555, 281761015, 845282069, 2535844733, 7607531923, 22822592343, 68467771805, 205403307437, 616209910235, 1848629712279, 5545889108805
Offset: 0

Author

Uri Levy, Dec 28 2010

Keywords

Comments

A. The Magnetic Tower of Hanoi puzzle is described in link 1 listed below. The Magnetic Tower is pre-colored. Pre-coloring is [RED ; NEUTRAL ; BLUE], given in [Source ; Intermediate ; Destination] order. The solution algorithm producing the sequence is optimal (the sequence presented gives the minimum number of moves to solve the puzzle for the given pre-coloring configuration). Optimal solutions are discussed and their optimality is proved in link 2 listed below.
B. Disk numbering is from largest disk (k = 1) to smallest disk (k = N)
C. The above-listed "original" sequence generates a "partial-sums" sequence - describing the total number of moves required to solve the puzzle.
D. Number of moves of disk k, for large k, is close to (8/11)*3^(k-1) ~ 0.727*3^(k-1). Series designation: P727(k).

References

  • Uri Levy, "The Magnetic Tower of Hanoi", Journal of Recreational Mathematics, Volume 35 Number 3 (2006), 2010, pp 173.

Crossrefs

A000244 "Powers of 3" is the sequence (also) describing the number of moves of the k-th disk solving [RED ; BLUE ; BLUE] or [RED ; RED ; BLUE] pre-colored Magnetic Tower of Hanoi.
A183111 through A183125 are related sequences, all associated with various solutions of the pre-coloring variations of the Magnetic Tower of Hanoi.

Programs

  • Mathematica
    Join[{0},LinearRecurrence[{3,1,-1,-6},{1,3,7,21},40]] (* or *) CoefficientList[ Series[ x(1-2x)(1+x)^2/((1-3x)(1-x^2-2x^3)),{x,0,40}],x] (* Harvey P. Dale, May 11 2011 *)

Formula

Recurrence Relations (a(n)=P727(n) as in referenced paper):
P727(k) = P727(k-2) + 2*P727(k-3) + 4*3^(k-3) + 4*3^(k-4) ; k >= 4
Closed-Form Expression:
Define:
λ1 = [1+sqrt(26/27)]^(1/3) + [1-sqrt(26/27)]^(1/3)
λ2 = -0.5* λ1 + 0.5*i*{[sqrt(27)+sqrt(26)]^(1/3)- [sqrt(27)-sqrt(26)]^(1/3)}
λ3 = -0.5* λ1 - 0.5*i*{[sqrt(27)+sqrt(26)]^(1/3)- [sqrt(27)-sqrt(26)]^(1/3)}
AP = [(1/11)* λ2* λ3 - (3/11)*(λ2 + λ3) + (9/11)]/[( λ2 - λ1)*( λ3 - λ1)]
BP = [(1/11)* λ1* λ3 - (3/11)*(λ1 + λ3) + (9/11)]/[( λ1 - λ2)*( λ3 - λ2)]
CP = [(1/11)* λ1* λ2 - (3/11)*(λ1 + λ2) + (9/11)]/[( λ2 - λ3)*( λ1 - λ3)]
For any k > 0:
P727(n) = (8/11)*3^(n-1) + AP* λ1^n + BP* λ2^n + CP* λ3^n.
G.f.: x*(1-2*x)*(1+x)^2/((1-3*x)*(1-x^2-2*x^3)); a(n) = 3*a(n-1)+a(n-2)-a(n-3)-6*a(n-4) with n>4. - Bruno Berselli, Dec 29 2010

Extensions

More terms from Harvey P. Dale, May 11 2011