OFFSET
1,2
COMMENTS
Minimal number of moves required, under the proviso of a classical tower-of-Hanoi game, to segregate an initial n-disc peg into even and odd numbered discs pegs. - Lekraj Beedassy, Sep 12 2006
REFERENCES
B. Averbach & O. Chein, "A Variant Of The Tower Of Brahma" in 'The Journal of Recreational Mathematics', pp. 48-55, vol. 33, no. 1, 2004-5, Baywood, NY.
LINKS
Index entries for linear recurrences with constant coefficients, signature (2,0,1,-2).
FORMULA
From Ralf Stephan, May 05 2004:
a(3n) = (5*8^n - 5)/7, a(3n+1) = (10*8^n - 3)/7, a(3n+2) = (20*8^n - 6)/7.
G.f.: (1+x^2)/((1-x)(1-2x)(1+x+x^2)). (End)
a(n) = a(n-6) + 45*2^(n-6). - Lekraj Beedassy, Sep 12 2006
The following recurrence produces this sequence: if(n==1) a(n)=1; else if(n%3==2) a(n)=a(n-1)*2; otherwise a(n)=a(n-1)*2+1. - Piotr Kakol, Jan 24 2011 (in an email message to N. J. A. Sloane).
a(n) = floor( (5/7)*2^n ). - Tani Akinari, Jul 15 2014
From Jorijn Lamberink and Paul van de Veen, Oct 14 2019: (Start)
a(n) = T(n-1) + 1 + T(n-3) + 1 + a(n-3), where T(n) = A000225(n) = 2^n-1 is the number of moves for a classic Tower of Hanoi with n discs.
a(n) = (5/8)*2^n + a(n-3).
a(n) = (5/7)*2^n - 2/3 - (1/21)*cos((2/3)*Pi*n) + (1/7)*sqrt(3)*sin((2/3)*Pi*n). (End)
MATHEMATICA
Table[FromDigits[PadRight[{}, n, {1, 0, 1}], 2], {n, 40}] (* Harvey P. Dale, Aug 26 2016 *)
PROG
(PARI) a(n)=if(n%3==0, 5*8^(n/3)-5, if(n%3==1, 10*8^((n-1)/3)-3, 20*8^((n-2)/3)-6))/7 \\ Ralf Stephan
(PARI) a(n)=(5*2^n)\7 \\ Tani Akinari, Jul 15 2014
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
EXTENSIONS
More terms from Lekraj Beedassy, Sep 12 2006
STATUS
approved