OFFSET
1,2
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
LINKS
Gary W. Adamson, Comments on A060572
J.-P. Allouche, D. Astoorian, J. Randall, and J. Shallit, Morphisms, squarefree strings, and the Tower of Hanoi puzzle, Amer. Math. Monthly 101 (1994), 651-658.
FORMULA
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.
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
EXAMPLE
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,...
PROG
(PARI) a(n) = (- (-1)^valuation(n, 2) - n)%3; \\ Kevin Ryde, Aug 07 2021
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Henry Bottomley, Apr 03 2001
STATUS
approved