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-6 of 6 results.

A292765 A292764(n)/2.

Original entry on oeis.org

1, 4, 9, 18, 33, 60, 105, 180, 309, 526, 895, 1520, 2581, 4378, 7427, 12596
Offset: 1

Views

Author

N. J. A. Sloane, Sep 27 2017

Keywords

Crossrefs

Cf. A292764.

A289265 Decimal expansion of the real root of x^3 - x^2 - 2 = 0.

Original entry on oeis.org

1, 6, 9, 5, 6, 2, 0, 7, 6, 9, 5, 5, 9, 8, 6, 2, 0, 5, 7, 4, 1, 6, 3, 6, 7, 1, 0, 0, 1, 1, 7, 5, 3, 5, 3, 4, 2, 6, 1, 8, 1, 7, 9, 3, 8, 8, 2, 0, 8, 5, 0, 7, 7, 3, 0, 2, 2, 1, 8, 7, 0, 7, 2, 8, 4, 4, 5, 2, 4, 4, 5, 3, 4, 5, 4, 0, 8, 0, 0, 7, 2, 2, 1, 3, 9, 9
Offset: 1

Views

Author

Clark Kimberling, Jul 14 2017

Keywords

Examples

			1.6956207695598620574163671001175353426181793882085077...
		

References

  • D. E. Daykin and S. J. Tucker, Introduction to Dragon Curves, unpublished, 1976, end of section 2. See links in A003229.

Crossrefs

Cf. A078140 (includes guide to constants similar to A289260).

Programs

  • Mathematica
    z = 2000; r = 8/5;
    u = CoefficientList[Series[1/Sum[Floor[(k + 1)*r] (-x)^k, {k, 0, z}], {x, 0, z}], x];  (* A289260 *)
    v = N[u[[z]]/u[[z - 1]], 200]
    RealDigits[v, 10][[1]] (* A289265 *)
  • PARI
    solve(x=1, 2, x^3 - x^2 - 2) \\ Michel Marcus, Oct 26 2019

Formula

r = D^(1/3) + (1/9)*D^(-1/3) + 1/3 where D = 28/27 + (1/9)*sqrt(29*3) [Chang and Zhang] from the usual cubic solution formula. Or similarly r = (1/3)*(1 + C + 1/C) where C = (28 + sqrt(29*27))^(1/3). - Kevin Ryde, Oct 25 2019

A005665 Minimal number of moves for the cyclic variant of the Towers of Hanoi for 3 pegs and n disks, with the final peg one step away.

Original entry on oeis.org

0, 1, 5, 15, 43, 119, 327, 895, 2447, 6687, 18271, 49919, 136383, 372607, 1017983, 2781183, 7598335, 20759039, 56714751, 154947583, 423324671, 1156544511, 3159738367, 8632565759, 23584608255, 64434348031, 176037912575, 480944521215, 1313964867583, 3589818777599, 9807567290367
Offset: 0

Views

Author

Keywords

Comments

Original name was: Tower of Hanoi with 3 pegs and cyclic moves only (clockwise). - Jianing Song, Nov 01 2024
This looks like sequence A(0,1;2,2;3) of the family of sequences [a,b:c,d:k] considered by Gary Detlefs, and treated as A(a,b;c,d;k) in the W. Lang link given below. - Wolfdieter Lang, Oct 18 2010

References

  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 1990, p. 18.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A005666, A007664, A007665, A026150 (first differences).
Cf. A338024, A292764, A338089 (4 pegs).

Programs

  • Haskell
    a005665 n = a005665_list !! (n-1)
    a005665_list = 0 : 1 : 5 : zipWith (-)
                   (map (* 3) $ drop 2 a005665_list) (map (* 2) a005665_list)
    -- Reinhard Zumkeller, May 01 2013
    
  • Magma
    [Floor(((Sqrt(3)+1)^(n+1)+(Sqrt(3)-1)^(n+1)*(-1)^n)*Sqrt(3)/6-1): n in [0..30] ]; // Vincenzo Librandi, Aug 19 2011
    
  • Mathematica
    a[n_] := Simplify[ ((1 + Sqrt[3])^(n+1) - (1 - Sqrt[3])^(n+1))*Sqrt[3]/6 - 1]; Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Dec 14 2011, after Paul Barry *)
    LinearRecurrence[{3,0,-2},{0,1,5},40] (* Harvey P. Dale, Mar 30 2015 *)
  • PARI
    a(n)=([0,1,0; 0,0,1; -2,0,3]^n*[0;1;5])[1,1] \\ Charles R Greathouse IV, Jun 15 2015

Formula

G.f.: x*(1+2*x)/((1-x)*(1-2*x-2*x^2)). - Simon Plouffe in his 1992 dissertation
From Paul Barry, Sep 05 2006: (Start)
a(n) = ((sqrt(3)+1)^(n+1) + (sqrt(3)-1)^(n+1)*(-1)^n)*sqrt(3)/6 - 1. (End)
a(n) = 2*a(n-1) + 2*a(n-2) + 3. - John W. Layman
a(n) = (1/(2*s3))*((1+s3)^(n+1) - (1-s3)^(n+1)) - 1 where s3 = sqrt(3).
a(n) = 3*a(n-1) - 2*a(n-3), a(0)=0, a(1)=1, a(2)=5 (from the given o.g.f.). Observed by Gary Detlefs. See the W. Lang link. - Wolfdieter Lang, Oct 18 2010
a(n) = 2*A005666(n-1) + 1. - Michel Marcus, Nov 02 2012
a(n) = Sum_{k=1..n} A026150(k). - Ivan N. Ianakiev, Nov 22 2019
E.g.f.: (1/3)*exp(x)*(-3 + 3*cosh(sqrt(3)*x) + sqrt(3)*sinh(sqrt(3)*x)). - Stefano Spezia, Nov 22 2019

Extensions

More terms from Vincenzo Librandi, Aug 19 2011
Name clarified by Paul Zimmermann, Feb 21 2018
New name based on the name of A338024, A292764, and A338089 by Jianing Song, Nov 01 2024

A338024 Minimal number of moves for the cyclic variant of Hanoi's tower for 4 pegs and n disks, with the final peg one step away.

Original entry on oeis.org

1, 6, 15, 28, 57, 98, 179, 304, 521, 894, 1519, 2576, 4381, 7434, 12603, 21380, 36265, 61486, 104263, 176808, 299797
Offset: 1

Views

Author

Paul Zimmermann, Oct 07 2020

Keywords

Examples

			For n=2, assume the two disks are on North initially, first move the smallest one to West in 3 moves, then the largest one to East in 1 move, and the smallest one to East also in 2 moves, with a total of 6 moves. Each disk has a number of moves which is 1 mod 4, thus a(n) = n mod 4.
		

Crossrefs

Formula

Conjecture: a(n) = a(n-1) + a(n-2) + a(n-3) - 2*a(n-5) for n > 11.
Conjectured g.f.: x*(1+5*x+8*x^2+6*x^3+8*x^4+8*x^6-4*x^8+4*x^9-4*x^10)/((1-x)*(1+x)*(1-x-2*x^3)). - Stefano Spezia, Oct 07 2020 after Paul Zimmermann

Extensions

a(17)-a(21) from Martin Ehrenstein, Oct 25 2020

A338089 Minimal number of moves for the cyclic variant of Hanoi's tower for 4 pegs and n disks, with the final peg three steps away.

Original entry on oeis.org

3, 10, 21, 40, 75, 134, 233, 400, 683, 1166, 1981, 3364, 5711, 9690, 16433, 27872, 47267, 80150, 135909, 230460, 390775
Offset: 1

Views

Author

Paul Zimmermann, Oct 09 2020

Keywords

Examples

			For n=2, assume the two disks are on North initially, first move the smallest one to South in 2 moves, then the largest one to East in 1 move, the smallest one back to North in 2 moves, the largest one to West in 2 moves, and finally the smallest one to West in 3 moves, with a total of 10 moves. Each disk has a number of moves which is 3 mod 4, thus a(n) == 3*n (mod 4).
		

Crossrefs

Formula

Conjecture: a(n) = a(n-1) + a(n-2) + a(n-3) - 2*a(n-5) for n > 9 (the same recurrence as conjectured in A292764 and A338024). - Pontus von Brömssen, Oct 12 2020
a(n) ~ k*r^n, k = (725 + (310451786 - 3203949*sqrt(87))^(1/3) + (310451786 + 3203949*sqrt(87))^(1/3))/348, r=constant of A289265 (closed-form by Amiram Eldar via von Brömssen conjecture). - Bill McEachen, Aug 19 2025

Extensions

a(17)-a(21) from Martin Ehrenstein, Oct 26 2020

A005666 Minimal number of moves for the cyclic variant of the Towers of Hanoi for 3 pegs and n disks, with the final peg two steps away.

Original entry on oeis.org

0, 2, 7, 21, 59, 163, 447, 1223, 3343, 9135, 24959, 68191, 186303, 508991, 1390591, 3799167, 10379519, 28357375, 77473791, 211662335, 578272255, 1579869183, 4316282879, 11792304127, 32217174015, 88018956287, 240472260607, 656982433791, 1794909388799
Offset: 0

Views

Author

Keywords

Comments

Original name was: Tower of Hanoi with 3 pegs and cyclic moves only (counterclockwise). - Jianing Song, Nov 01 2024

References

  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 1990, p. 18.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A005665, A052945 (first differences).
Cf. A338024, A292764, A338089 (4 pegs).

Programs

  • Magma
    [Floor((1/(4*Sqrt(3)))*((1+Sqrt(3))^(n+2)-(1-Sqrt(3))^(n+2))-1): n in [0..30]]; // Vincenzo Librandi, Sep 03 2015
  • Mathematica
    CoefficientList[Series[z (2 + z)/(z - 1)/(2 z^2 + 2 z - 1), {z, 0, 22}], z] (* Michael De Vlieger, Sep 02 2015 *)
    LinearRecurrence[{3,0,-2},{0,2,7},30] (* Harvey P. Dale, Jul 28 2025 *)

Formula

a(n) = (1/(4*s3))*((1+s3)^(n+2)-(1-s3)^(n+2))-1 where s3 = sqrt(3).
a(n) = A028859(n) - 1.
G.f.: x*(2+x) / ( (x-1)*(2*x^2+2*x-1) ). - Simon Plouffe in his 1992 dissertation
From Paul Zimmermann, Feb 07 2018: (Start)
a(n) = 2*a(n-1)+2*a(n-2)+3 (same recurrence as A005665).
a(n) = 2*a(n-1)+c(n-1)+2 where c(n) = 2*a(n-1)+1 stands for A005665. (End)
E.g.f.: exp(x)*(3*cosh(sqrt(3)*x) + 2*sqrt(3)*sinh(sqrt(3)*x) - 3)/3. - Stefano Spezia, Apr 11 2025

Extensions

Name clarified by Paul Zimmermann, Feb 09 2018
New name based on the name of A338024, A292764, and A338089 by Jianing Song, Nov 01 2024
Showing 1-6 of 6 results.