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

A060572 Tower of Hanoi: the optimal way to move an even number of disks from peg 0 to peg 2 or an odd number from peg 0 to peg 1 is on move n to move disk A001511 from peg A060571 to peg A060572 (here).

Original entry on oeis.org

1, 2, 2, 1, 0, 1, 1, 2, 2, 0, 0, 2, 1, 2, 2, 1, 0, 1, 1, 0, 2, 0, 0, 1, 1, 2, 2, 1, 0, 1, 1, 2, 2, 0, 0, 2, 1, 2, 2, 0, 0, 1, 1, 0, 2, 0, 0, 2, 1, 2, 2, 1, 0, 1, 1, 2, 2, 0, 0, 2, 1, 2, 2, 1, 0, 1, 1, 0, 2, 0, 0, 1, 1, 2, 2, 1, 0, 1, 1, 0, 2, 0, 0, 2, 1, 2, 2, 0, 0, 1, 1, 0, 2, 0, 0, 1, 1, 2, 2, 1, 0, 1, 1, 2, 2
Offset: 1

Views

Author

Henry Bottomley, Apr 03 2001

Keywords

Comments

If written in a fractal pattern of 4 X 4 squares, skipping the first square, going right then down then right then down, etc.:
X122 1011 ...
1011 0200
2200 1122
2122 1011
a number of patterns become apparent. Most notably the central diagonal going from the X down and to the right, when the 1's and 2's are reversed, gives the sequence A060571. When the same process is applied to A060571, this sequence emerges. - Donald Sampson (marsquo(AT)hotmail.com), Dec 01 2003

Examples

			Start by moving first disk (from peg 0) to peg 1, second disk (from peg 0) to peg 2, first disk (from peg 1) to peg 2, etc., so sequence starts 1,2,2,...
		

Crossrefs

Programs

  • PARI
    a(n) = (- (-1)^valuation(n,2) - n)%3; \\ Kevin Ryde, Aug 07 2021

Formula

a(n) = A060571(n) - (-1)^A001511(n) mod 3.
If n > 2^A001511(n) then a(n) = a(n-2^A001511(n)) - (-1)^A001511(n) mod 3, otherwise a(k) = -(-1)^A001511(n) mod 3.
a(n) = A001511(n)-th digit from right of A055662(n).
If a(n)=0 then a(2n)=0, If a(n)=1 then a(2n)=2, If a(n)=2 then a(2n)=1, Thus a(n)=a(4n). - Donald Sampson (marsquo(AT)hotmail.com), Dec 01 2003
a(5n) = A060571(n) with the 1's and 2s reversed. - Donald Sampson (marsquo(AT)hotmail.com), Dec 08 2003

A060571 Tower of Hanoi: the optimal way to move an even number of disks from peg 0 to peg 2 or an odd number from peg 0 to peg 1 is on move n to move disk A001511 from peg A060571 (here) to peg A060572.

Original entry on oeis.org

0, 0, 1, 0, 2, 2, 0, 0, 1, 1, 2, 1, 0, 0, 1, 0, 2, 2, 0, 2, 1, 1, 2, 2, 0, 0, 1, 0, 2, 2, 0, 0, 1, 1, 2, 1, 0, 0, 1, 1, 2, 2, 0, 2, 1, 1, 2, 1, 0, 0, 1, 0, 2, 2, 0, 0, 1, 1, 2, 1, 0, 0, 1, 0, 2, 2, 0, 2, 1, 1, 2, 2, 0, 0, 1, 0, 2, 2, 0, 2, 1, 1, 2, 1, 0, 0, 1, 1, 2, 2, 0, 2, 1, 1, 2, 2, 0, 0, 1, 0, 2, 2, 0, 0, 1
Offset: 1

Views

Author

Henry Bottomley, Apr 03 2001

Keywords

Comments

a(n) is equal to a(2n) with the 1's and 2s reversed, thus a(n) = a(4n). - Donald Sampson (marsquo(AT)hotmail.com), Dec 01 2003

Examples

			Start by moving first disk from peg 0 (to peg 1), second disk from peg 0 (to peg 2), first disk form peg 1 (to peg 2), etc. so sequence starts 0,0,1,...
		

Crossrefs

Formula

If n>2^A001511(n) then a(n)=a(n-2^A001511(n))-(-1)^A001511(n) mod 3 =A060572(n-2^A001511(n)), otherwise a(k)=0. Also A001511(n)-th digit from right of A055662(n-1).

A060573 Tower of Hanoi: using the optimal way to move an even number of disks from peg 0 to peg 2 or an odd number from peg 0 to peg 1, a(n) is the smallest disk on peg 0 after n moves.

Original entry on oeis.org

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

Views

Author

Henry Bottomley, Apr 03 2001

Keywords

Examples

			Start by moving first disk from peg 0 to peg 1, second disk from peg 0 to peg 2, first disk from peg 1 to peg 2, etc. so sequence starts 1,2,3,3,...
		

Crossrefs

Cf. A060574 (smallest on peg 1), A060575 (smallest on peg 2), A055662 (whole configuration).

A060575 Tower of Hanoi: using the optimal way to move an even number of disks from peg 0 to peg 2 or an odd number from peg 0 to peg 1, a(n) is the smallest disk on peg 2 after n moves (or 0 if there are no disks on peg 2).

Original entry on oeis.org

0, 0, 2, 1, 1, 2, 0, 0, 4, 1, 1, 4, 3, 3, 2, 1, 1, 2, 3, 3, 4, 1, 1, 4, 0, 0, 2, 1, 1, 2, 0, 0, 6, 1, 1, 6, 3, 3, 2, 1, 1, 2, 3, 3, 6, 1, 1, 6, 5, 5, 2, 1, 1, 2, 5, 5, 4, 1, 1, 4, 3, 3, 2, 1, 1, 2, 3, 3, 4, 1, 1, 4, 5, 5, 2, 1, 1, 2, 5, 5, 6, 1, 1, 6, 3, 3, 2, 1, 1, 2, 3, 3, 6, 1, 1, 6, 0, 0, 2, 1, 1, 2, 0, 0, 4
Offset: 0

Views

Author

Henry Bottomley, Apr 03 2001

Keywords

Examples

			Start by moving first disk from peg 0 to peg 1, second disk from peg 0 to peg 2, first disk from peg 1 to peg 2, etc. so sequence starts 0,0,2,1,...
		

Crossrefs

Cf. A060573 (smallest on peg 0), A060574 (smallest on peg 1), A055662 (whole configuration).
Showing 1-4 of 4 results.