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.

Showing 1-5 of 5 results.

A183125 Magnetic Tower of Hanoi, total number of moves, 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, 4, 11, 30, 83, 236, 687, 2026, 6027, 18008, 53927, 161654, 484803, 1454212, 4362399, 13086914, 39260411, 117780848, 353342103, 1060025806, 3180076851, 9540229916, 28620689039, 85862066330, 257586198123, 772758593416, 2318275779207, 6954827336486, 20864482008227, 62593446023348, 187780338068607, 563341014204274, 1690023042611163
Offset: 0

Views

Author

Uri Levy, Jan 08 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 [NEUTRAL ; NEUTRAL ; NEUTRAL], given in [Source ; Intermediate ; Destination] order. The solution algorithm producing the presented sequence is NOT optimal. The particular "61" algorithm solving the puzzle at hand is not explicitly presented in any of the referenced papers. 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.
Large N limit of the sequence is 0.5*(197/324)*3^N ~ 0.5*0.61*3^N. Series designation: S61(n).

References

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

Crossrefs

A183123 is an integer sequence generated by another non-optimal algorithm solving the "free" [NEUTRAL ; NEUTRAL ; NEUTRAL] Magnetic Tower of Hanoi puzzle.
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

  • GAP
    a:=[30, 83, 236, 687, 2026];; for n in [6..30] do a[n]:=5*a[n-1]-6*a[n-2] -2*a[n-3]+7*a[n-4]-3*a[n-5]; od; Concatenation([0, 1, 4, 11], a); # G. C. Greubel, Dec 04 2018
  • Magma
    I:=[0,1,4,11,30,83,236,687,2026]; [n le 9 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
    
  • Magma
    m:=30; R:=PowerSeriesRing(Integers(), m); [0] cat Coefficients(R!( (-4*x^8 -2*x^6 +x^4 -3*x^3 -x^2 +x)/(3*x^5 -7*x^4 +2*x^3 +6*x^2 -5*x +1))); // G. C. Greubel, Dec 04 2018
    
  • Maple
    seq(coeff(series((-4*x^8-2*x^6+x^4-3*x^3-x^2+x)/(3*x^5-7*x^4+2*x^3+6*x^2-5*x+1),x,n+1), x, n), n = 0 .. 35); # Muniru A Asiru, Dec 04 2018
  • Mathematica
    Join[{0, 1, 4, 11}, LinearRecurrence[{5, -6, -2, 7, -3}, {30, 83, 236, 687, 2026}, 30]] (* Jean-François Alcover, Dec 04 2018 *)
    CoefficientList[Series[(- 4 x^8 - 2 x^6 + x^4 - 3 x^3 - x^2 + x) / (3 x^5 - 7 x^4 + 2 x^3 + 6 x^2 - 5 x + 1), {x, 0, 33}], x] (* Vincenzo Librandi, Dec 04 2018 *)
  • PARI
    my(x='x+O('x^30)); concat([0], Vec((-4*x^8 -2*x^6 +x^4 -3*x^3 -x^2 +x)/(3*x^5 -7*x^4 +2*x^3 +6*x^2 -5*x +1))) \\ G. C. Greubel, Dec 04 2018
    
  • Sage
    s=((-4*x^8 -2*x^6 +x^4 -3*x^3 -x^2 +x)/(3*x^5 -7*x^4 +2*x^3 +6*x^2 -5*x +1)).series(x, 30); s.coefficients(x, sparse=False) # G. C. Greubel, Dec 04 2018
    

Formula

G.f.: (-4*x^8 -2*x^6 +x^4 -3*x^3 -x^2 +x)/(3*x^5 -7*x^4 +2*x^3 +6*x^2 -5*x +1).
a(n) = +5*a(n-1)-6*a(n-2)-2*a(n-3)+7*a(n-4)-3*a(n-5).
(a(n) = S61(n) as in referenced paper):
a(n) = 3*a(n-1) - 2*n^2 + 17*n - 43 ; n even ; n >= 6.
a(n) = 3*a(n-1) - 2*n^2 + 17*n - 42 ; n odd ; n >= 5.
a(n) = S64(n-1) + S64(n-2) + S75(n-3) + 4*3^(n-3) + 2 ; n >= 3.
S64(n) and S75(n) refer to the integer sequences described by A183121 and A183119 respectively.
a(n) = 0.5*(197/324)*3^n + n^2 - 5.5*n + 91/8; n even; n >= 4.
a(n) = 0.5*(197/324)*3^n + n^2 - 5.5*n + 93/8; n odd; n >= 5.

Extensions

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

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

Views

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

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

Views

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

A183123 Magnetic Tower of Hanoi, total number of moves, 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, 4, 11, 30, 83, 236, 691, 2050, 6123, 18336, 54971, 164870, 494563, 1483636, 4450851, 13352490, 40057403, 120172136, 360516331, 1081548910, 3244646643, 9733939836, 29201819411, 87605458130, 262816374283, 788449122736, 2365347368091, 7096042104150
Offset: 0

Views

Author

Uri Levy, Jan 07 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 [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.
Large N limit of the sequence is 0.5*(67/108)*3^N ~ 0.5*0.62*3^N. Series designation: S62(n).

References

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

Crossrefs

Cf. 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" is an "original" sequence describing the number of moves of disk number k, solving the pre-colored puzzle at hand when executing the "62" algorithm mentioned above.
Cf. 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
    LinearRecurrence[{4,-2,-4,3},{0,1,4,11,30,83,236},40] (* Harvey P. Dale, Jun 07 2015 *)
  • PARI
    concat(0, Vec(x*(4*x^5+2*x^4+2*x^3+3*x^2-1)/((x-1)^2*(x+1)*(3*x-1)) + O(x^100))) \\ Colin Barker, Sep 18 2014

Formula

a(n)=+4*a(n-1)-2*a(n-2)-4*a(n-3)+3*a(n-4) for n>6.
(a(n) = S62(n) as in referenced paper):
S62(n) = 3*S62(n-1) - 5*n + 17; n even; n >= 4
S62(n) = 3*S62(n-1) - 5*n + 13; n odd; n >= 5
S62(n) = S67(n-1) + S67(n-2) + S75(n-3) + 4*3^(n-3) + 2; n >= 3
S67(n) and S75(n) refer to the integer sequences described by A104743 and A183119 respectively.
S62(n) = 0.5*(67/108)*3^n + 2.5*n - 41/8; n even; n >= 4
S62(n) = 0.5*(67/108)*3^n + 2.5*n - 39/8; n odd; n >= 3.
a(n) = -5-(-1)^n/8+(67*3^(-3+n))/8+(5*n)/2 for n>2. - Colin Barker, Sep 18 2014
G.f.: x*(4*x^5+2*x^4+2*x^3+3*x^2-1) / ((x-1)^2*(x+1)*(3*x-1)). - Colin Barker, Sep 18 2014

Extensions

More terms and correction to recurrence by Colin Barker, Sep 18 2014

A183124 Magnetic Tower of Hanoi, number of moves of disk number n, 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, 451, 1339, 4001, 11981, 35919, 107727, 323149, 969409, 2908187, 8724515, 26173497, 78520437, 235561255, 706683703
Offset: 0

Views

Author

Uri Levy, Jan 08 2011

Keywords

Comments

The Magnetic Tower of Hanoi puzzle is described in the preprint of March 2010. 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 "61" algorithm solving the puzzle at hand is not explicitly presented in any of the referenced papers. 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 the preprint of Nov 2010.
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 (197/324)*3^(k-1) ~ 0.61*3^(k-1). Series designation: P61(k).

References

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

Crossrefs

A183122 is an integer sequence generated by another non-optimal algorithm solving the "free" [NEUTRAL ; NEUTRAL ; NEUTRAL] Magnetic Tower of Hanoi puzzle.
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.

Formula

G.f.: (-4*x^8 -2*x^6 +x^4 -3*x^3 -x^2 +x)/(-3*x^4 +4*x^3 +2*x^2 -4*x +1)
a(n)=+4*a(n-1)-2*a(n-2)-4*a(n-3)+3*a(n-4), n>=9.
(a(n) = P61(n) as in referenced paper):
a(n) = 3*a(n-1) - 4*n + 18 ; n even ; n >= 5
a(n) = 3*a(n-1) - 4*n + 20 ; n odd ; n >= 6
a(n) = P64(n-1) + P64(n-2) + P75(n-3) + 8*3^(n-4) ; n >= 4
P75(n) and P64(n) refer to the integer sequences described by A122983 and A183120 respectively. See also A183119.
a(n) = (197/324)*3^(n-1) + 2*n - 27/4; n even; n >= 6
a(n) = (197/324)*3^(n-1) + 2*n - 25/4; n odd; n >= 5
Showing 1-5 of 5 results.